1.安装SSH服务器和客户端
sudo apt-get install openssh-server
sudo apt-get install openssh-client
2.配置SSH客户端和服务器
# 打开SSH客户端配置文件
sudo vi /etc/ssh/ssh_config
去掉PasswordAuthentication yes 前的#号,保存退出。
# 打开SSH服务器配置文件
sudo vi /etc/ssh/sshd_config
把PasswordAuthentication no 改为 PasswordAuthentication yes 保存退出。
3.重启SSH服务
sudo /etc/init.d/ssh restart
4.SSH连接服务器(以abc用户登录服务器127.0.0.1)
C:\Users\admin>ssh abc@127.0.0.1 -a
abc@127.0.0.1's password:
Welcome to Ubuntu 18.04.2 LTS (GNU/Linux 4.4.0-19041-Microsoft x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
System information as of Sun Jul 16 17:46:31 CST 2023
System load: 0.52 Memory usage: 62% Processes: 9
Usage of /home: unknown Swap usage: 0% Users logged in: 0
=> There were exceptions while processing one or more plugins. See
/var/log/landscape/sysinfo.log for more information.
329 packages can be updated.
221 updates are security updates.
New release '20.04.6 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
*** System restart required ***
Last login: Sun Jul 16 16:36:30 2023 from 127.0.0.1
1172




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



