安装netstat sudo apt install net-tools
2)netstat -ntlp | grep 22 查看22端口是否打开
3)sudo apt install aptitude
4)aptitude search ssh-server 查看ssh-server是否安装
P v是未安装 i是安装
- sudo apt install openssh-server
- Aptitude search ssh-server
- ssh -V 查看ssh版本 sudo ps -e | grep ssh
- Sudo service ssh start
- Securitycrt 连接ubuntu 报错
No compatible key exchange method. The server supports these methods: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
解决办法,在/etc/ssh/sshd_config 中第118行增加
KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1