Windows10 WSL Ubuntu中安装ssh server
在WSL Ubuntu系统中安装ssh server
当对Linux实现文件操作时,使用WinScp更为方便。因此需要使用ssh远程登陆
安装ssh server
sudo apt-get install openssh-server
配置ssh
使用 cp 命令将 SSH 相关配置备份
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
使用 vim 编辑 sshd_config 文件
调整一下设置:
Port 2222
ListenAddress 0.0.0.0
PermitRootLogin yes
StrictModes yes
PasswordAuthentication yes
重启ssh service
sudo service ssh restart
登陆 SSH
使用 SSH 指令登陆
ssh [email protected] -p 2222