【简单开始】xshell连接windows子系统linux
修改ssh配置文件> cd /etc/ssh> cat sshd_config修改配置文件> vim sshd_config配置文件修改项如下:#修改端口Port 2222#打开本地监听ListenAddress 0.0.0.0#允许密码登陆PasswordAuthentication yes重启ssh> sudo serv...
·
修改ssh配置文件
> cd /etc/ssh
> cat sshd_config
- 修改配置文件
> vim sshd_config
配置文件修改项如下:
#修改端口
Port 2222
#打开本地监听
ListenAddress 0.0.0.0
#允许密码登陆
PasswordAuthentication yes
#允许root登录
PermitRootLogin yes
重启ssh
> sudo service ssh restart
- 可能会遇到错误:报“Could not load host key”错
- 解决方法:重新生成host key
> sudo dpkg-reconfigure openssh-server
使用xshell连接
更多推荐
已为社区贡献1条内容
所有评论(0)