ubuntu系统安装完后root设置和网络配置

1. 修改 root 密码
sudo passwd root
2. 以其他账户登录,通过 sudo nano 修改 /etc/ssh/sshd_config :
xxx@ubuntu14:~$ su - root
Password:
root@ubuntu14:~# vi /etc/ssh/sshd_config
3. 注释掉 #PermitRootLogin without-password,添加 PermitRootLogin yes
# Authentication:
LoginGraceTime 120
#PermitRootLogin without-password
PermitRootLogin yes
StrictModes yes
4. 重启 ssh 服务
root@ubuntu14:~# sudo service ssh restart
ssh stop/waiting
ssh start/running, process 1499
root@ubuntu14:~#

5.ip配置
vi /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto ens160
iface ens160 inet static
address 192.168.0.159
netmask 255.255.255.0
#network 172.31.27.0
#broadcast 172.31.27.255
gateway 192.168.0.254
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 8.8.8.8
#dns-search ubuntu

相关主题
相关文档
最新文档