helloyy

  问题:当连接ssh远程终端或使用ftp方式进行文件传输时,使用普通用户可以进行远程登录,但使用root用户则认证失败,提示密码错误。而我们在普通用户登录下,su - root,验证密码,是可以正常切换到root用户的。

  背景工具:ubuntu系统, SecureCRT,FileZilla/FlashFXP等

  解决方法:

  1、登录普通用户,su - root 切换到root用户下;

  2、cd /etc/ssh,切换到以下目录:

  

  观察到该目录下存在ssh_config和sshd_config文件。

  3、vim sshd_config,需要修改文件中的root用户登录属性,如下:

  

  如图,注释掉PermitRootLogin without-password,并添加PermitRootLogin yes。

  4、重启ssh服务:service ssh restart

  

  再次尝试ssh或ftp远程连接,即可正常访问。

  参考博客:http://www.cnblogs.com/xwdreamer/p/6604593.html

 

分类:

技术点:

相关文章:

  • 2021-08-15
  • 2021-10-10
  • 2021-04-15
  • 2021-09-25
  • 2021-05-03
  • 2021-11-09
猜你喜欢
  • 2021-05-06
  • 2021-12-04
  • 2021-07-25
  • 2021-11-01
  • 2022-12-23
  • 2021-07-09
  • 2021-09-14
  • 2021-08-06
相关资源
相似解决方案