Ubuntu下配置IP及开启SSH


Ubuntu系统在安装时如果没有配置IP你只要开启SSH后配置一个IP及网关就可以远程操作了。下面就如何设置IP作个介绍:

一、ifconfig  eth0(网卡名称) 10.0.0.5(ip地址) netmask 255.255.255.0(掩码)

二、route add default gw 10.0.0.1(网关)

三、开启SSH

查看是否有/etc/ssh/sshd_config文件

1、cat /etc/ssh/sshd_config

如果有则:

2、/etc/init.d/ssh  restart

没有这个文件则:

3、apt-get update(升级)

4、apt-get  install  ssh

5、y

四、系统安装时没有root用户的处理:

1、sudo  passwd后输入三次密码(已有的非root用户的)

2、userdel  -f 12345(密码) 两次

3、这时退出以root的用户登录。

相关内容