純命令行linux下載太費勁了,安裝一個ssh輕松一點,用windows下載,傳輸到linux后tar安裝。
1.linux安裝openssh(不記得具體的命令的,大概是這樣 參考https://blog.csdn.net/qq_38701476/article/details/81135428)
sudo apt-get install openssh-server
2.su啟動ssh
service ssh start
如果提示以下內容,則還需要生成key才可以
Could not load host key: /etc/ssh/ssh_host_rsa_key Could not load host key: /etc/ssh/ssh_host_ecdsa_key Could not load host key: /etc/ssh/ssh_host_ed25519_key
參考:http://blog.sina.com.cn/s/blog_b5dfe4870102yg59.html
oenSSH服務器第一次安裝到Linux系統時,SSH主機密鑰應該會自動生成以供后續使用。如果密鑰生成過程沒有成功完成,那就會導致這樣的SSH登錄問題。
解決方法:
在Debian、Ubuntu或其衍生版上,你可以使用dpkg-reconfigure工具來重新生成SSH主機密鑰,過程如下:
- $ sudo rm -r /etc/ssh/ssh*key
- $ sudo dpkg-reconfigure openssh-server
編輯 sshd_config,(這個是server的配置,ssh_config是client的配置)
root@Yzz:/etc/ssh# vi sshd_config
我忘了具體這行怎么寫了,反正是密碼認證
passwordAuthxxxxxxx yes
3.獲取linux本地IP地址,在其他機器上通過ssh訪問該IP地址
root@Yzz:/etc/ssh# ifconfig docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255 inet6 fe80::42:f9ff:fe75:432b prefixlen 64 scopeid 0x20<link> ether 02:42:f9:75:43:2b txqueuelen 0 (Ethernet) RX packets 63 bytes 30458 (30.4 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 84 bytes 6604 (6.6 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 172.24.174.126 netmask 255.255.240.0 broadcast 172.24.175.255 inet6 fe80::215:5dff:fef0:5e5 prefixlen 64 scopeid 0x20<link> ether 00:15:5d:f0:05:e5 txqueuelen 1000 (Ethernet) RX packets 374033 bytes 522539167 (522.5 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 127209 bytes 7606447 (7.6 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 40 bytes 11324 (11.3 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 40 bytes 11324 (11.3 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
在windows的xshell/xftp中訪問