ubuntu14.04允许root远程链接、修改主机名

1.设置root密码

sudo passwd root

2.修改主机名

第一步:ubuntu主机名位于/etc/hostname里,将其修改为自己需要的名称。

第二步:修改/etc/hosts文件,将其中127.0.1.1对应的主机名更改为新的主机名,与/etc/hostname里的主机名一致。

第三步:重启系统。

3.允许root远程链接

安装服务端,默认已经安装了openssh-client

apt-get install openssh-server 

修改配置文件:

 vi /etc/ssh/sshd_config
#注释掉 #PermitRootLogin without-password,添加 PermitRootLogin yes # Authentication: LoginGraceTime 120 #PermitRootLogin without-password PermitRootLogin yes StrictModes yes

完成后重启机器。

 

你可能感兴趣的:(ubuntu14.04允许root远程链接、修改主机名)