ssh远程登录linux live系统

要想ssh远程登录,须要准备两件事:配置同网段IP和开启SSH服务。


因为live系统没有IP,所以首先须要配置IP。

我的live系统是在虚拟机上启动的,宿主IP为192.168.230.1,live系统的IP我设置为192.168.230.180:

#ifconfig eth0 192.168.230.180

然后在SecurityCRT上连接live系统,输入password时发现live系统也没实用户password。这时候若不输password或者随便输入一个password,SecurityCRT也是不让连接的。

所以须要在live系统上配置password,live系统默认是root用户登录。使用passwd命令改动password。


接下来输入password连接会输出例如以下失败信息,由于live系统的SSH服务没有开启:

The remote system refused the connection.


接下来开启live系统的SSH服务:

#/etc/rc.d/init.d/sshd start


接下来再用使用SecurityCRT连接就成功了:

Last login: Sat May 31 13:14:34 2014
lfslivecd:root | Sat May 31 13:24:42 2014 | ~
#


总结一下。总共同拥有三步:

1、配置IP

2、设置rootpassword

3、开启SSH服务


注:

若先开启SSH服务,后设置rootpassword。则须要在设置rootpassword后又一次启动SSH服务。

原文地址:https://www.cnblogs.com/lcchuguo/p/5257803.html