Linux服务器搬迁记(一)

更换服务器必过之坑(一):文件转移

Linux服务器一般通过ssh进行远程操作,为了避免各种权限问题导致转移不成功,我一般直接使用root账户。这次却是行不通了。ssh进行文件传输,默认禁止用root登录(不熟悉Linux和ssh的根本想不到啊)。

解决方法:

1) 以root身份,vim /etc/ssh/sshd_config

3) 将PermitRootLogin prohibit-password改成PermitRootLogin yes

4) service sshd restart

查资料不过是偏门,撸源码才是脱离苦海的正道。
原文地址:https://www.cnblogs.com/jarvisjin/p/6081027.html