cd /etc/ssh #切换到ssh配置文件的位置
sudo cp sshd_config sshd_config.bak #先把原来的备份
sudo vim sshd_config #编辑配置文件
Port 3652 #修改端口,原来的22端口已经存在
ListenAddress 0.0.0.0 #打开本地监听
#StrictModes yes #注释掉
PasswordAuthentication yes #修改登陆的方式,允许密码登陆
PermitRootLogin yes#允许root用户登录(可选)
sudo service ssh restart #.重新启动SSH
sudo dpkg-reconfigure openssh-server#重新生成host key
xshell密码连接win10自带ubantu
猜你喜欢
转载自blog.csdn.net/qq_45206551/article/details/105028387
今日推荐
周排行