Samuraiwtf-解决sshd安装启动

东西没仔细看就给别人了,具体是系统默认的sshd怎么都起不来。于是重新安装一下,过程如下

[email protected]:~# netstat -nlt

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address Foreign Address State

tcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN

tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN

tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN

tcp6 0 0 ::1:631 :::* LISTEN

tcp6 0 0 :::443 :::* LISTEN

tcp6 0 0 :::80 :::* LISTEN

[email protected]:~# /etc/init.d/

acpid grub-common reboot

anacron halt resolvconf

apache2 irqbalance rsync

apparmor kerneloops rsyslog

apport killprocs saned

avahi-daemon kmod sendsigs

bluetooth lightdm single

brltty mysql speech-dispatcher

console-setup networking ssh

cron ondemand sudo

cryptdisks openvpn udev

cryptdisks-early pppd-dns umountfs

cups procps umountnfs.sh

cups-browsed pulseaudio umountroot

dbus rc unattended-upgrades

dns-clean rc.local urandom

friendly-recovery rcS x11-common

[email protected]:~# /etc/init.d/ssh start

[email protected]:~# cd /etc/init.d

[email protected]:/etc/init.d# ls

acpid dbus pppd-dns skeleton

anacron dns-clean procps speech-dispatcher

apache2 friendly-recovery pulseaudio ssh

apparmor grub-common rc sudo

apport halt rc.local udev

avahi-daemon irqbalance rcS umountfs

bluetooth kerneloops README umountnfs.sh

brltty killprocs reboot umountroot

console-setup kmod resolvconf unattended-upgrades

cron lightdm rsync urandom

cryptdisks mysql rsyslog x11-common

cryptdisks-early networking saned

cups ondemand sendsigs

cups-browsed openvpn single

[email protected]:/etc/init.d# more ssh

...............没有任何问题....................

[email protected]:/etc/init.d# /etc/init.d/ssh reload

[email protected]:/etc/init.d# apt-get update

Ign http://dl.google.com stable InRelease

Get:1 http://dl.google.com stable Release.gpg [916 B]

Get:2 http://dl.google.com stable Release [1,189 B]

Get:3 http://security.ubuntu.com trusty-security InRelease [65.9 kB]

Ign http://us.archive.ubuntu.com trusty InRelease

Ign http://archive.canonical.com trusty InRelease

Get:4 http://ppa.launchpad.net trusty InRelease [15.5 kB]

Get:5 http://us.archive.ubuntu.com trusty-updates InRelease [65.9 kB]

Get:6 http://archive.canonical.com trusty Release.gpg [933 B]

Get:7 http://ppa.launchpad.net trusty/main i386 Packages [6,858 B]

Get:8 http://security.ubuntu.com trusty-security/main Sources [118 kB]

Get:9 http://archive.canonical.com trusty Release [9,359 B]

Ign http://extras.ubuntu.com trusty InRelease

Get:10 http://us.archive.ubuntu.com trusty-backports InRelease [65.9 kB]

Get:11 http://security.ubuntu.com trusty-security/restricted Sources [4,064 B]

Get:12 http://extras.ubuntu.com trusty Release.gpg [72 B]

Get:13 http://security.ubuntu.com trusty-security/universe Sources [38.0 kB]

Get:14 http://security.ubuntu.com trusty-security/multiverse Sources [2,760 B]

Get:15 http://security.ubuntu.com trusty-security/main i386 Packages [477 kB]

Get:16 http://archive.canonical.com trusty/partner Sources [10.0 kB]

Get:17 http://extras.ubuntu.com trusty Release [11.9 kB]

Get:18 http://ppa.launchpad.net trusty/main Translation-en [3,553 B]

Get:19 http://us.archive.ubuntu.com trusty Release.gpg [933 B]

Get:20 http://archive.canonical.com trusty/partner i386 Packages [6,285 B]

Get:21 http://us.archive.ubuntu.com trusty-updates/main Sources [380 kB]

Get:22 http://archive.canonical.com trusty/partner Translation-en [4,593 B]

Get:23 http://security.ubuntu.com trusty-security/restricted i386 Packages [12.7 kB]

Get:24 http://security.ubuntu.com trusty-security/universe i386 Packages [131 kB]

Get:25 http://extras.ubuntu.com trusty/main Sources [1,064 kB]

Get:26 http://extras.ubuntu.com trusty/main i386 Packages [1,348 kB]

Get:27 http://security.ubuntu.com trusty-security/multiverse i386 Packages [5,178 B]

Get:28 http://security.ubuntu.com trusty-security/main Translation-en [282 kB]

Get:29 http://extras.ubuntu.com trusty/main Translation-en [762 kB]

Ign http://extras.ubuntu.com trusty/main Translation-en_US

Get:30 http://security.ubuntu.com trusty-security/multiverse Translation-en [2,570 B]

Get:31 http://security.ubuntu.com trusty-security/restricted Translation-en [3,206 B]

Get:32 http://security.ubuntu.com trusty-security/universe Translation-en [77.2 kB]

Get:33 http://us.archive.ubuntu.com trusty-updates/restricted Sources [5,360 B]

Get:34 http://us.archive.ubuntu.com trusty-updates/universe Sources [160 kB]

Get:35 http://us.archive.ubuntu.com trusty-updates/multiverse Sources [7,137 B]

Get:36 http://us.archive.ubuntu.com trusty-updates/main i386 Packages [631 kB]

Get:37 http://us.archive.ubuntu.com trusty-updates/restricted i386 Packages [15.6 kB]

Get:38 http://us.archive.ubuntu.com trusty-updates/universe i386 Packages [369 kB]

Get:39 http://us.archive.ubuntu.com trusty-updates/multiverse i386 Packages [15.2 kB]

Get:40 http://us.archive.ubuntu.com trusty-updates/main Translation-en [423 kB]

Get:41 http://us.archive.ubuntu.com trusty-updates/multiverse Translation-en [7,661 B]

Get:42 http://us.archive.ubuntu.com trusty-updates/restricted Translation-en [3,699 B]

Get:43 http://us.archive.ubuntu.com trusty-updates/universe Translation-en [193 kB]

Get:44 http://us.archive.ubuntu.com trusty Release [58.5 kB]

Get:45 http://us.archive.ubuntu.com trusty-backports/main Sources [9,561 B]

Get:46 http://us.archive.ubuntu.com trusty-backports/restricted Sources [28 B]

Get:47 http://us.archive.ubuntu.com trusty-backports/universe Sources [35.2 kB]

Get:48 http://us.archive.ubuntu.com trusty-backports/multiverse Sources [1,898 B]

Get:49 http://us.archive.ubuntu.com trusty-backports/main i386 Packages [13.3 kB]

Get:50 http://us.archive.ubuntu.com trusty-backports/restricted i386 Packages [28 B]

Get:51 http://us.archive.ubuntu.com trusty-backports/universe i386 Packages [43.2 kB]

Get:52 http://us.archive.ubuntu.com trusty-backports/multiverse i386 Packages [1,552 B]

Get:53 http://us.archive.ubuntu.com trusty-backports/main Translation-en [7,493 B]

Get:54 http://us.archive.ubuntu.com trusty-backports/multiverse Translation-en [1,215 B]

Get:55 http://us.archive.ubuntu.com trusty-backports/restricted Translation-en [28 B]

Get:56 http://us.archive.ubuntu.com trusty-backports/universe Translation-en [36.8 kB]

Get:57 http://us.archive.ubuntu.com trusty/main Sources [1,064 kB]

Get:58 http://us.archive.ubuntu.com trusty/restricted Sources [5,433 B]

Get:59 http://us.archive.ubuntu.com trusty/universe Sources [6,399 kB]

Get:60 http://us.archive.ubuntu.com trusty/multiverse Sources [174 kB]

Get:61 http://us.archive.ubuntu.com trusty/main i386 Packages [1,348 kB]

Get:62 http://us.archive.ubuntu.com trusty/restricted i386 Packages [13.4 kB]

Get:63 http://us.archive.ubuntu.com trusty/universe i386 Packages [5,866 kB]

Get:64 http://us.archive.ubuntu.com trusty/universe i386 Packages [5,866 kB]

Get:65 http://us.archive.ubuntu.com trusty/multiverse i386 Packages [134 kB]

Get:66 http://us.archive.ubuntu.com trusty/main Translation-en [762 kB]

Get:67 http://us.archive.ubuntu.com trusty/multiverse Translation-en [102 kB]

Get:68 http://us.archive.ubuntu.com trusty/restricted Translation-en [3,457 B]

Get:69 http://us.archive.ubuntu.com trusty/universe Translation-en [4,089 kB]

Ign http://us.archive.ubuntu.com trusty/main Translation-en_US

Ign http://us.archive.ubuntu.com trusty/multiverse Translation-en_US

Ign http://us.archive.ubuntu.com trusty/restricted Translation-en_US

Ign http://us.archive.ubuntu.com trusty/universe Translation-en_US

Fetched 22.2 MB in 4min 42s (78.7 kB/s)

W: There is no public key available for the following key IDs:

1397BC53640DB551

W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release Unable to find expected entry ‘main/binary-i386/Packages‘ in Release file (Wrong sources.list entry or malformed file)

?
?

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/main/binary-i386/Packages Hash Sum mismatch

?
?

W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/trusty/main/source/Sources Hash Sum mismatch

?
?

W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/trusty/main/binary-i386/Packages Hash Sum mismatch

?
?

E: Some index files failed to download. They have been ignored, or old ones used instead.

[email protected]:/etc/init.d# apt-get install openssh-server

Reading package lists... Done

Building dependency tree

Reading state information... Done

The following extra packages will be installed:

openssh-client

Suggested packages:

libpam-ssh keychain monkeysphere rssh molly-guard

The following packages will be upgraded:

openssh-client openssh-server

2 upgraded, 0 newly installed, 0 to remove and 243 not upgraded.

Need to get 902 kB of archives.

After this operation, 5,120 B of additional disk space will be used.

Do you want to continue? [Y/n] y

Get:1 http://security.ubuntu.com/ubuntu/ trusty-security/main openssh-server i386 1:6.6p1-2ubuntu2.7 [325 kB]

Get:2 http://security.ubuntu.com/ubuntu/ trusty-security/main openssh-client i386 1:6.6p1-2ubuntu2.7 [577 kB]

Fetched 902 kB in 5s (164 kB/s)

Preconfiguring packages ...

(Reading database ... 311843 files and directories currently installed.)

Preparing to unpack .../openssh-server_1%3a6.6p1-2ubuntu2.7_i386.deb ...

Unpacking openssh-server (1:6.6p1-2ubuntu2.7) over (1:6.6p1-2ubuntu2.4) ...

Preparing to unpack .../openssh-client_1%3a6.6p1-2ubuntu2.7_i386.deb ...

Unpacking openssh-client (1:6.6p1-2ubuntu2.7) over (1:6.6p1-2ubuntu2.4) ...

Processing triggers for ureadahead (0.100.0-16) ...

ureadahead will be reprofiled on next reboot

Processing triggers for ufw (0.34~rc-0ubuntu2) ...

Processing triggers for man-db (2.6.7.1-1ubuntu1) ...

Setting up openssh-client (1:6.6p1-2ubuntu2.7) ...

Setting up openssh-server (1:6.6p1-2ubuntu2.7) ...

initctl: Unknown job: ssh

[email protected]:/etc/init.d# service ssh start

start: Unknown job: ssh

还是无法启动,只有采取强制性的办法了:

[email protected]:/etc/init.d# sudo /usr/sbin/sshd

Missing privilege separation directory: /var/run/sshd

[email protected]:/etc/init.d# sudo mkdir /var/run/sshd

[email protected]:/etc/init.d# sudo /usr/sbin/sshd

[email protected]:/etc/init.d# netstat -nlt

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address Foreign Address State

tcp 0 0 127.0.1.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

tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN

tcp6 0 0 :::22 :::* LISTEN

tcp6 0 0 ::1:631 :::* LISTEN

tcp6 0 0 :::443 :::* LISTEN

tcp6 0 0 :::80 :::* LISTEN

[email protected]:/etc/init.d#

?

OK,问题解决。

时间: 2024-10-24 22:43:07

Samuraiwtf-解决sshd安装启动的相关文章

hadoop学习---2.cygwin及sshd安装配置

cygwin是一个在windows平台上运行的unix模拟环境,是cygnus solutions公司开发的自由软件(该公司开发了很多好东西,著名的还有eCos,不过现已被Redhat收购).它对于学习unix/linux操作环境,或者从unix到windows的应用程序移植,或者进行某些特殊的开发工作,尤其是使用gnu工具集在windows上进行嵌入式系统开发,非常有用. 在进行hadoop的windows安装后,第二步就是cygwin的安装,虽然很多人建议在linux环境下来进行hadoop

判断App是否第一次安装启动

流行的解决方案是在大多数地方是用[NSUserDefaults standardUserDefaults的一个关键,如果它不存在,这意味着这是应用程序启动,否则,它不是第一次.然后,它说设置成后者在该方法的关键:“applicationWillTerminate:(UIApplication*)application”.这一解决方案非常好,直到我们得到的iOS 4.0.在iOS 4.0 +这种方法很少被称为(只适用于内存问题)在苹果的UIApplicationDelegate文档中所述....

MySQL:解决MySQL无法启动的问题

MySQL无法启动的原因有多种,这里是我遇到的一种情况和解决方法. 起因: 最近项目需要使用MySQL,于是想在MAC上安装一个本地的数据库,但是其实忘了已经安装过一个版本了,结果发现新的服务器怎么也无法运行. 现象: 通过命令行启动MySQL:sudo /usr/local/mysql/support-files/mysql.server start Starting MySQL 一直得到这个错误: ERROR! The server quit without updating PID fil

解决MSDE2000安装SA强密码SAPWD开关和混合模式登录问题

解决MSDE2000安装SA强密码SAPWD开关和混合模式登录问题 2012 年 9 月 9 日 今天帮客户安装某某软件,需要用到SQL Server数据库,之前一直是直接装个SQL Server 2000企业版完事的,但是觉得这个太庞大了,安装略显麻烦.客户使用的软件也不需要功能多复杂的SQL Server. 其实我想尝试一下SQL Server 2005 Express的,无可奈何的是那个软件太破旧了,只能用SQL Server 2000凑合用了,其实SQL Server 2000也有类似的

【linux】U盘安装启动出现press the enter key to begin the installation process 就不动弹了

今天在物理机上安装centOS6.5  64bit 系统的时候,出现了U盘安装启动出现press the enter key to begin the installation process 就不动弹了: 解决办法如下: 替换U盘中,/syslinux/vesamenu.c32文件 文件共享地址:http://pan.baidu.com/s/1kVk1kIN

解决rails server启动错误

gems/execjs-2.0.2/lib/execjs/runtimes.rb:51in 'autodetect': Could not find a JavaScript runtime. 解决方法: 1.安装execjs gem  install execjs 2.安装therubyracer gem install therubyracer 3.在Gemfile文件中最后加入下面代码: gem 'execjs' gem 'therbuyracer' 为了不每次都在Gemfile文件中加这

Weblogic安装启动流程及免密后台启动

Weblogic安装启动流程一.安装步骤: 1.启动安装程序:$ <YOUR_JAVA_HOME>/bin/java -jar -Xmx1200m wls1211_generic.jar -mode=console例如:/root/jdk1.8.0_144/bin/java -jar -Xmx1200m wls1211_generic.jar -mode=consoleExtracting 0%..................................................

nat123安装启动教程帮助

转自:http://www.nat123.com/Pages_17_291.jsp 本文就nat123安装启动可能遇到的问题及与安全狗影响处理. 下载安装nat123客户端安装包.第一次安装使用,可选择下载"整合运行环境安装包"执行安装. 在安装启动过程中,如无异常提示,即表示安装成功. 可能问题一,如安装后运行nat123提示".NET初始化错误". 问题原因:本地无.NET4或.NET4环境异常. 解决方法: (1)使用整合运行环境安装包进行安装. (2)如使用

CAD安装失败怎样卸载重新安装CAD,解决CAD安装失败的方法总结

技术帖:CAD没有按照正确方式卸载,导致CAD安装失败.楼主也查过网上关于如何解决CAD安装失败的一些文章,是说删除几个CAD文件和CAD软件注册表就可以解决CAD安装失败的问题,实际的情况并没有这么简单,导致CAD安装失败的原因有很多种.CAD安装时产生了几万条注册表,想要彻底卸载CAD软件再重新安装CAD,就有几万条CAD注册表要删除,非人力所能为.现在虽然360或一些卸载软件提供了强力卸载CAD的工具,可以将CAD注册表和一些CAD目录的CAD残留信息删除,但仍不能确保将CAD所有相关dl