Ubuntu环境下SSH的安装及使用

SSH分客户端openssh-client和openssh-server

Ubuntu默认是安装 SSH 客户端的,但是没有安装 server 端

  1. 安装server端

    sudo apt-get install openssh-server
    
  2. 然后确认sshserver是否启动

    ps -e|grep ssh
    

SSH常用的服务命令

停止服务:sudo /etc/init.d/ssh stop

启动服务:sudo /etc/init.d/ssh start

重启服务:sudo /etc/init.d/sshresart

断开连接:exit