xfpt 连接Linux失败问题

首先切换到root用户

1.

su

 

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

sudo passwd root

 

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

apt-get  install vsftpd

 

2、修改文件 /etc/vsftpd.conf 
这里写图片描述 
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
posted @ 2018-08-01 14:18  不会游泳的鱼丶  阅读(956)  评论(0编辑  收藏  举报