目錄
- 問題描述
- 視窗 可視化桌面
- 命令行
問題描述
[C:\~]$ Connecting to 192.166.8.85:22...
Could not connect to '192.166.8.85' (port 22): Connection failed.Type `help' to learn how to use Xshell prompt.
[C:\~]$ Connecting to 192.166.8.85:22...
Could not connect to '192.166.8.85' (port 22): Connection failed.Type `help' to learn how to use Xshell prompt.
[C:\~]$ Connecting to 192.166.8.85:22...
Could not connect to '192.166.8.85' (port 22): Connection failed.Type `help' to learn how to use Xshell prompt.
[C:\~]$ Connecting to 192.166.8.85:22...
Could not connect to '192.166.8.85' (port 22): Connection failed.Type `help' to learn how to use Xshell prompt.
[C:\~]$ Connecting to 192.166.8.85:22...
Could not connect to '192.166.8.85' (port 22): Connection failed.Type `help' to learn how to use Xshell prompt.
[C:\~]$
這種情況就是 openssh-server安裝好了,也能ping通
嘗試來連接立馬就顯示 連接失敗!ssh一個空ip 地址 都會有一段的搜索時間
明顯不是安裝問題,而是配置問題
視窗 可視化桌面
把ssh key 代理打開了,不知道怎么打開的,關掉
OK打完收工!
命令行
建議關閉圖形界面:
關閉
sudo systemctl set-default multi-user.target
恢復
sudo systemctl set-default graphical.target
關閉
ssh-agent -k
禁止自啟動
eval $(ssh-agent)
查看進程是否在運行
ps aux | grep ssh-agent