ubuntu安装SSH

来源:互联网 发布:linux 终端乱码 编辑:程序博客网 时间:2024/05/17 06:54

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 huangjinhui@192.168.50.89


原创粉丝点击