赵沛松吧 关注:7贴子:67
  • 2回复贴,共1

ssh连接Ubuntu Linux出现Permission denied, please try again

只看楼主收藏回复

ssh连接出现Permission denied, please try again.(ssh功能未安装和root账号无法连接)
源:http://asyty.iteye.com/blog/1440141
Ubuntu下测试ssh时使用ssh localhost 命令,出现错误提示connect to host localhost port 22:Connection refused
造成这个错误的原因可能是ssh-server未安装或者未启动。ubuntu 18.10 默认安装openssh-client,但是木有安装server
运行 ps -e | grep ssh,查看是否有sshd进程
如果没有,说明server没启动,通过 /etc/init.d/ssh -start 启动server进程,如果提示ssh不存在 那么就是没安装server
通过 sudo apt-get install openssh-server命令安装后 /etc/init.d/ssh -start 即可
root不能ssh解决:
vi /etc/ssh/sshd_config
PermitRootLogin yes
修改后重启:
/etc/init.d/ssh restart


IP属地:北京1楼2022-01-25 18:04回复
    /


    IP属地:北京来自iPhone客户端2楼2022-02-28 23:40
    回复


      IP属地:北京来自iPhone客户端4楼2022-04-15 13:31
      回复