SSH登入之解決埠無響應
阿新 • • 發佈:2019-02-09
兩臺機子,A(ip:192.168.1.106)使用ssh連線B(ip:192.168.1.107),
在A上面輸入: ssh 192.168.1.107 回車後出現: ssh: connect to host 192.168.1.107 port 22: Connection refused 這個是因為B機上面ssh沒有openssh的元件,一般是沒有:openssh-server 然後在B機上面安裝: sudo apt-get install openssh-client sudo apt-get install openssh-server
再然後:在B機上面重啟ssh:
sudo /etc/init.d/ssh restart
停止ssh:
sudo /etc/init.d/ssh stop
開啟ssh:
sudo /etc/init.d/ssh start
然後以root登入:
ssh -l root 192.168.1.107
然後提示你輸入密碼:
root@192.168.1.107's password:
之後:
The programs included with the Ubuntu system are free software ;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
Welcome to Ubuntu 13.04 (GNU/Linux 3.8.0-34-generic i686)
* Documentation: https://help.ubuntu.com/
Your Ubuntu release is not supported anymore.
For upgrade information, please visit:
http://www.ubuntu.com/releaseendoflife
New release '13.10' available.
Run 'do-release-upgrade' to upgrade to it.
接下來就可以操作了.
在A上面輸入: ssh 192.168.1.107 回車後出現: ssh: connect to host 192.168.1.107 port 22: Connection refused 這個是因為B機上面ssh沒有openssh的元件,一般是沒有:openssh-server 然後在B機上面安裝: sudo apt-get install openssh-client sudo apt-get install openssh-server