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

root@samuraiwtf:~# 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

root@samuraiwtf:~# /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

root@samuraiwtf:~# /etc/init.d/ssh start

root@samuraiwtf:~# cd /etc/init.d

root@samuraiwtf:/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

root@samuraiwtf:/etc/init.d# more ssh

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

root@samuraiwtf:/etc/init.d# /etc/init.d/ssh reload

root@samuraiwtf:/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.

root@samuraiwtf:/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

root@samuraiwtf:/etc/init.d# service ssh start

start: Unknown job: ssh

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

root@samuraiwtf:/etc/init.d# sudo /usr/sbin/sshd

Missing privilege separation directory: /var/run/sshd

root@samuraiwtf:/etc/init.d# sudo mkdir /var/run/sshd

root@samuraiwtf:/etc/init.d# sudo /usr/sbin/sshd

root@samuraiwtf:/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

root@samuraiwtf:/etc/init.d#

 

OK,问题解决。

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

  1. sh: /etc/init.d/sshd: not found Docker中的Alpine镜像安装sshd无法启动

    问题描述 在Alpine镜像中安装了openssh-server和openssh之后,无法执行ssh localhost.发现未启动服务,开启服务时报以下错误 / # ls /etc/init.d/s ...

  2. 提示“Web打印服务CLodop未安装启动”的各种原因和解决方法

    旧版提示:"CLodop云打印服务(localhost本地)未安装启动!"新版提示:"Web打印服务CLodop未安装启动,点击这里下载执行安装(若此前已安装过,可点这里 ...

  3. 【转】解决keepalived正常启动但是虚IP(VIP)没有生成的问题

    如题所示,keepalived安装配置好之后能够正常启动,但是虚IP并没有生成.接着检查防火墙(iptables)发现也没有相关的限制.稍微郁闷了一下之后,查看了keepalived日志文件,这次成功 ...

  4. 解决:安装SQL Server 2008 Native Client遇到错误(在Navicat premium新建sqlserver连接时 需要):An error occurred during ...HRESULT: 0x80070422(注意尾部的错误号)

    解决:安装SQL Server 2008 Native Client遇到错误(在Navicat premium新建sqlserver连接时 需要):An error occurred during . ...

  5. nginx入门与实战 安装 启动 配置nginx Nginx状态信息(status)配置 正向代理 反向代理 nginx语法之location详解

    nginx入门与实战 网站服务 想必我们大多数人都是通过访问网站而开始接触互联网的吧.我们平时访问的网站服务 就是 Web 网络服务,一般是指允许用户通过浏览器访问到互联网中各种资源的服务. Web ...

  6. 解决MSDE安装回滚的问题

    rem 解决MSDE安装回滚的问题.bat rem 设置为手动rem sc config "LanmanServer" start= DEMAND rem 设置为自动sc conf ...

  7. 编译安装php5 解决编译安装的php加载不了gd

    1. 编译安装php需要的模块: yum install libxml2-devel libxml2  curl curl-devel  libpng-devel  libpng  openssl o ...

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

    今天在物理机上安装centOS6.5  64bit 系统的时候,出现了U盘安装启动出现press the enter key to begin the installation process 就不动 ...

  9. c# windows server安装启动与卸载

    使用installutil.exe安装卸载服务时,由于需要指向服务的全路径,由于生成目录往往不是服务发布的最终目录,很不便利,下面介绍两种方式方便操作: 方式一: 项目中加入install.bat与u ...

随机推荐

  1. 39、生鲜电商平台-redis缓存在商品中的设计与架构

    说明:Java开源生鲜电商平台-redis缓存在商品中的设计与架构. 1. 各种计数,商品维度计数和用户维度计数 说起电商,肯定离不开商品,而附带商品有各种计数(喜欢数,评论数,鉴定数,浏览数,etc ...

  2. Window Live Writer在Win7下安装提示错误“OnCatalogResult:0x80190194”

    1.在C:\Users\All Users\Microsoft\WLSetup\Logs下(All Users默认是隐藏文件夹),有两个Window Live的安装日记记录文件,打开第一个找到ERRO ...

  3. python drift

    install dependency(optional):(本文来自 不才b_d 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/sinat_36184075/arti ...

  4. vue -- 插件的开发与使用

    开发插件 插件通常会为 Vue 添加全局功能.插件的范围没有限制--一般有下面几种: 1.添加全局方法或者属性,如: vue-custom-element. 2.添加全局资源:指令/过滤器/过渡等,如 ...

  5. 发布一个npm包

    前言 我这里是写了一个vue轮播图插件,因此我使用了vue的脚手架工具创建一个项目,当然你也可以选择自己搭建脚手架. 本例中我会使用vue脚手架创建一个项目,并发布到npm上面去. 通过脚手架创建项目 ...

  6. java学习笔记——基于Robot类的屏幕分享

    直接上代码,具体看注释: package robot; import java.awt.AWTException; import java.awt.Dimension; import java.awt ...

  7. elasticsearch 聚合查询

    1. 按照 tags 字段 进行分组 GET /ecommerce/product/_search{ "size": 0,  "aggs": {    &quo ...

  8. springIOC源码解析之Bean的创建

    上一篇讲到了beanFactory的配置文件的解析和beanFactory的创建,都集中到了obtainFreshBeanFactory();这一句代码里了,本篇主要讲bean的创建过程 public ...

  9. Unity---MonoBehaviour9大生命周期

    1.MonoBehaviour9大生命周期 MonoBehaviour是一个基类,所有Unity脚本都派生自该类. Awake():在脚本实例化时被调用. Start():在Awake之后,Updat ...

  10. Unity---DOTween插件学习(3)---获取数据、协程、路径动画

    目录 10.获取数据 11.携程 12.路径动画 本文及系列参考于Andy老师的DOTween系列 欢迎大家关注Andy老师 10.获取数据 类方法 返回所有暂停的动画,没有则返回null var l ...