docker 容器内启动 sshd 启动报错

创建容器设置密码 安装 openssh-server 启动出错

在容器内 使用 /usr/sbin/sshd -d 启动报错?

[[email protected] tmp]# /usr/sbin/sshd -d
debug1: sshd version OpenSSH_7.4, OpenSSL 1.0.2k-fips  26 Jan 2017
debug1: key_load_private: No such file or directory
debug1: key_load_public: No such file or directory
Could not load host key: /etc/ssh/ssh_host_rsa_key
debug1: key_load_private: No such file or directory
debug1: key_load_public: No such file or directory
Could not load host key: /etc/ssh/ssh_host_ecdsa_key
debug1: key_load_private: No such file or directory
debug1: key_load_public: No such file or directory
Could not load host key: /etc/ssh/ssh_host_ed25519_key
sshd: no hostkeys available -- exiting.

解决办法:

# /usr/sbin/sshd-keygen -A
# ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
# ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
再重新执行启动# /usr/sbin/sshd

远程链接

ssh [email protected] -p 22

原文地址:https://www.cnblogs.com/sharesdk/p/10102936.html

时间: 2024-10-12 11:48:22

docker 容器内启动 sshd 启动报错的相关文章

MySQL在windows系统中修改datadir路径后无法启动问题,报错1067

windows server2008下如何更改MySQL数据库的目录的帖子已经很多了,这里简单介绍一个步骤,如果不成功请先查看其它帖子. 更改默认的mysql数据库目录 将 C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.1\data 改到 D:\MysqlData 1. 建立文件夹 D:\MysqlData 2. 停止 mysql 服务,将 "C:\Documents and Settings\

启动MYSQL 57 报错“The service MYSQL57 failed the most recent........等”的问题解决方式!

每天开机之后,启动MYSQL Notifier就报错,第一次出现重启电脑后解决,后面的几天老是出现,重启电脑好几次都没有解决,感觉很烦人,一定要搞定这个问题找到原因,于是有了下文....... 启动MYSQL 57报错信息"The service MYSQL57 failed the most recent status change request with the message time out has expired and the operation has not been comp

启动Tomcat服务器报错

启动Tomcat服务器报错: Several ports (8005, 8080, 8009) required by Tomcat v5.5 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to sto

Android 启动Tomcat服务报错,端口占用解决方案

启动Tomcat服务器报错:Several ports (8005, 8080, 8009) required by Tomcat v5.5 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop

Appium1.6启动ios9.3报错Original error: Sdk '9.3.5' was not in list of simctl sdks

问题: 使用Apppium1.6启动ios9.3报错Original error: Sdk '9.3.5' was not in list of simctl sdks 我的启动配置如下 { "platformName": "ios", "platformVersion": "9.3.5", "bundleId": "com.wuba.zhuanzhuan", "app&quo

Oracle启动监听报错:The listener supports no services解决

Oracle启动监听报错:The listener supports no services解决 及ora-12514 未注册上服务问题. Oracle11g服务器重启系统之后,出现了几个莫名的报错,下面是其中一个,已解决. $ lsnrctl start 报错提示: The listener supports no servicesThe command completed successfully 这样启动后远程连接会报错:oracle ORA-12514:TNS:listener does

【翻译自mos文章】Weblogic AdminServer 启动fail,报错为"unable to get file lock, will retry"

Weblogic AdminServer 启动fail,报错为"unable to get file lock, will retry" 参考原文: Weblogic AdminServer fails with "unable to get file lock, will retry" error message (Doc ID 1613945.1) 适用于: Oracle WebLogic Server - Version 8.1 and later Infor

hadoop启动,DataNode报错”Incompatible clusterIDs“

启动namenode,通过50070端口查看,发现livenode只有一个--namenode,查看datanode日志,发现有”Incompatible clusterIDs“错误,提示很明显,namenode和datanode的集群id不一致 解决办法:找到core-site.xml配置文件,进入”dfs.datanode.data.dir“配置项下的目录,在current目录下有一VERSION文件,比较namenode和datanode里这个文件中的clusterID,发现不一致,因此只

启动安卓模拟器报错 emulator: ERROR: x86_64 emulation currently requires hardware acceleration! CPU acceleration status:HAXM must be updated(version 1.1.1<6.0.1) 解决办法

启动安卓模拟器报错 emulator: ERROR: x86_64 emulation currently requires hardware acceleration!  CPU acceleration status:HAXM must be updated(version 1.1.1<6.0.1) 解决办法: 在android sdk 安装目录下找到 \Android\sdk\extras\intel\Hardware_Accelerated_Execution_Manager 双击int

Angular2启动项目的报错:ERROR in AppModule is not an NgModule

Angular2启动项目的报错,类似于如下报错截图,希望对大家有用,报错信息:ERROR in AppModule is not an NgModule 出现这类问题是因为版本不同导致启动失败 下面介绍下解决方案: 1.查看依赖组件  npm ls typescript 如下图 图中信息表明:这个项目需要依赖的版本2.2.2 ,电脑中已安装的版本2.3.2. 2.输入cnpm install typescript [email protected],安装一个2.2.2的版本.(看另一篇博客,我把