用xshell客戶端連接主機出現錯誤:
ssh 用戶名@ip_address [port]
官方文檔上的提示:
"Could not connect to 'hostname' (port 22): Connection failed."
Check if the host machine is ready for connection and the port is reachable. If you are connecting to a SSH server, make sure that SSH daemon is running on the remote host.
然後意識到可能是沒有安裝ssh服務。於是sudo apt-get install openssh-server
出現如下錯誤:
解決方法:安裝所有安全更新和重要更新
問題解決。