ubuntu server启用SSH

在终端使用命令测试:

ssh localhost

如果出现以下错误,则很可能是因为还没有安装ssh-server:

ssh: connect to host localhost port 22: Connection refused

安装SSH-server:

sudo apt-get update   //更新系统
 
sudo apt-get install openssh-server openssh-client

启动SSH-Server

sudo /etc/init.d/ssh start

你可能感兴趣的:(ssh,ubuntu)