无法输入汉字解决方案
解决方案:在bash中启动一个sshd服务器,用ssh登录到bash。
注意:
1. 因win10默认安装了一个sshd服务,要把bash中的sshd服务改端口。
2. 启动bash后,sshd服务没的自动起来,需手动启动,网上有资料可把bash中的sshd做成win10的一个服务程序,自动启动 How to run sshd as a windows service ?。
把bash 作为windows的服务启动:
Thank you everyone, you have helped me a lot.
I use two scripts to achieve my goals:
script 1 named startssh.bat, the contents is :
cd C:\Windows\System32
bash.exe -c “/usr/sbin/sshd -D”
script 2 named autostartssh.vbe, the contents is :
set ws=wscript.createobject(“wscript.shell”)
ws.run “startssh.bat /start”,0
the script 2 can run script 1 like a deamon, then I add scipt 2 to a Windows Task Scheduler, it will run on the computer starts.
Now, I can connected to my sshd server from xshell, it works well !
以上方法可以整合成一个vbe文件(autostartssh.vbe):
set ws=wscript.createobject(“wscript.shell”)
ws.run “C:\Windows\System32\bash.exe -c ‘/usr/sbin/sshd -D -p 8022’”,0
需要注意的是,在bash中,sshd需要root权限才能运行,可以用如下几种方法解决:
1. sudo chmod +s /usr/sbin/sshd (测试可行)
2. username host = (root) NOPASSWD: /usr/sbin/sshd让执行sudo sshd时不需要密码(未测试)
使用emacs问题
- 要安装xsel , 否则在simpleclip.el中提示剪贴板不可用。
- 好像用符号链接目录时有问题
本文介绍如何在Windows 10系统上通过bash启动并配置SSH服务,包括更改端口、实现服务自动启动的方法及解决汉字输入问题。此外还涉及了使用emacs编辑器时可能遇到的问题及解决方式。
3113

被折叠的 条评论
为什么被折叠?



