解决live CD方式启动Ubuntu系统不能启动openssh-server服务
2014-05-05 22:04
483 查看
当直接从Live CD镜像(例如从U盘)启动Ubuntu系统时,如果想要安装sshd服务,那么需要安装openssh-server软件包,如果用apt-get install的方式安装不了就换用aptitude安装,安装成功后却发现启动不了ssh服务,如下所示:
问题展现:
启动端口22表示ssh服务成功启动,可以使用ssh localhost测试下。
参考资料:openssh-server package does not start
sshd on a live CD boot
问题展现:
Preconfiguring packages ... Selecting previously unselected package openssh-server. (Reading database ... 154905 files and directories currently installed.) Unpacking openssh-server (from .../openssh-server_1%3a6.0p1-1ubuntu1_i386.deb) ... Selecting previously unselected package ssh-import-id. Unpacking ssh-import-id (from .../ssh-import-id_2.12-0ubuntu1_all.deb) ... Processing triggers for ureadahead ... Processing triggers for ufw ... Processing triggers for man-db ... Setting up openssh-server (1:6.0p1-1ubuntu1) ... Creating SSH2 RSA key; this may take some time ... Creating SSH2 DSA key; this may take some time ... Creating SSH2 ECDSA key; this may take some time ... initctl: Unknown job: ssh start: Unknown job: ssh Setting up ssh-import-id (2.12-0ubuntu1) ... Trying to start it manually produces the same result: ubuntu@ubuntu:~$ sudo start ssh start: Unknown job: ssh ubuntu@ubuntu:~$ sudo /etc/init.d/ssh start Rather than invoking init scripts through /etc/init.d, use the service(8) utility, e.g. service ssh start initctl: Unknown job: ssh Since the script you are attempting to invoke has been converted to an Upstart job, you may also use the start(8) utility, e.g. start ssh
解决方案:
这应该算是Ubuntu的一个bug,可以用下面的方法解决:ubuntu@ubuntu:~$ sudo /usr/sbin/sshd Missing privilege separation directory: /var/run/sshd ubuntu@ubuntu:~$ sudo mkdir /var/run/sshd ubuntu@ubuntu:~$ sudo /usr/sbin/sshd ubuntu@ubuntu:~$ netstat -nlt Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN tcp6 0 0 :::22 :::* LISTEN
启动端口22表示ssh服务成功启动,可以使用ssh localhost测试下。
参考资料:openssh-server package does not start
sshd on a live CD boot
相关文章推荐
- 解决live CD方式启动Ubuntu系统不能启动openssh-server服务
- 【解决办法】ubuntu server 版的 ISO文件,在 Ultra ISO 打开,内容不对,写入到 启动U盘,也不能引导系统
- mysql服务不能启动(The server quit without updating PID file) 解决方法
- windows系统在恢复镜像备份之后,只能启动ubuntu系统,不能启动windows系统的问题解决
- sql server express版本不能启动代理服务的另类解决办法
- Ubuntu 14.04 desktop 不能安装 openssh-server解决方法
- Ubuntu 14.04根据系统,休眠后不能启动要解决的问题
- 不能正常启动OracleOraHome92ManagementServer服务解决啦
- 在win7、ubuntu双系统的win7下修改分区,系统不能正常启动,grub rescue问题的解决方法
- Windows系统中无法启动Lync Server音频测试服务的解决方法图解
- Windows下mysql5.7.9解压缩版正确安装步骤,解决win10等windows系统不能启动mysql服务
- 关于恢复万象OL的C盘系统后,重装万象OL后MSDE服务不能启动的解决
- 破解windows下MySQL服务启动不了的情况下不能对其进行全然卸载的解决方式
- window/linux(ubuntu/linuxMint) 双系统不能启动终极解决办法
- ubuntu server 版的 ISO文件,在 Ultra ISO 打开,内容不对,写入到 启动U盘,也不能引导系统
- Windows xp和ubuntu 9.10双系统,重装windows后,mbr被覆盖,grub不能启动的解决方法
- Ubuntu系统Redis配置服务启动常见错误解决办法
- 解决Windows 7 系统,Group Policy Client 服务未启动,不能登录的问题。
- ubuntu下安装ssh服务以及不能启动的问题解决
- 解决ubuntu 13.04登入系统后触摸板不能使用的问题