首先切换到root用户

1.

su

 

未设置root密码的可以使用一下命令

sudo passwd root

 

一、上传文件失败(一动不动) 
1、安装ftp服务

apt-get  install vsftpd

 

2、修改文件 /etc/vsftpd.conf 
xfpt 连接Linux失败问题 
3、重启vsftpd

sudo /etc/init.d/vsftpd restart

 

 

二、上传文件有动发现有些出现connot open file,这是权限不够导致的 
直接使用

chmod -R 777 文件夹的名称

 

三、出现无法连接root用户 
开启ssh服务,执行以下命令:

/etc/init.d/ssh start    或 service sshd start

 

然后ifconfig查看其ip地址,当Xshell连接虚拟机时,提示:SSH服务器拒绝了密码。请再试一次。

sshd的设置不允许root用户用密码远程登录

修改 /etc/ssh/sshd_config

vim /etc/ssh/sshd_config

 

 

  找到# Authentication:
   LoginGraceTime 120
   PermitRootLogin without passwd
   StrictModes yes
改成

   # Authentication:
   LoginGraceTime 120
   PermitRootLogin yes
   StrictModes yes

 

 

 

重启虚拟机

reboot

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-04-13
  • 2021-10-05
  • 2021-10-30
  • 2021-12-15
  • 2021-07-29
  • 2022-03-08
猜你喜欢
  • 2021-11-20
  • 2021-08-05
  • 2021-12-24
  • 2022-12-23
  • 2022-12-23
  • 2021-11-21
  • 2021-06-13
相关资源
相似解决方案