ubuntu安装SSH


1、在终端输入命令:ssh localhost,测试系统是否已经安装ssh-server
   出线如下的信息表示没有安装
   ssh: connect to host localhost port 22: Connection refused

2、输入命令安装ssh:
    sudo apt-get install openssh-server

3、系统将自动进行安装,安装完成以后,先启动服务:
     sudo /etc/init.d/ssh start  

4、启动后,可以通过如下命令查看服务是否正确启动
   ps -e|grep ssh   

5、修改ssh的端口
   vi /etc/ssh/sshd_config   
   
   Port 22  

6、测试连接ssh [email protected]


你可能感兴趣的:(ubuntu安装SSH)