• 安装ssh服务器

    1
    sudo apt install openssh-server
  • 安装ssh客户端

    1
    sudo apt install openssh-client
  • 配置ssh客户端,去掉PasswordAuthentication yes前面的#号,保存退出;配置ssh服务器,把PermitRootLogin prohibit-password改成PermitRootLogin yes,保存退出。

    1
    sudo vi /etc/ssh/ssh_config
  • 重启ssh服务

    1
    sudo /etc/init.d/ssh restart
  • 启动ssh服务

    1
    sudo /etc/init.d/ssh start