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

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

[root@9d41c7f36c5e tmp]# /usr/sbin/sshd -d
debug1: sshd version OpenSSH_7., OpenSSL 1.0.2k-fips Jan
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 root@ip -p 

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

  1. docker 容器使用 systemctl 命令是报错

    看了许多解决方案,但是对于新手来说并不友好,不是特别清楚 报错内容: System has not been booted with systemd as init system (PID 1). C ...

  2. keepalived 容器在宿主机重启后无法启动问题:报错:daemon is already running

    初步猜测原因是:keepalived容器内的keepalived.pid文件在keepalived容器非正常退出时,没有正确删除,造成第二次启动时容器检查到pid文件已经存在,认为该进程已经存在,因为 ...

  3. 启动Tomcat服务器报错

    启动Tomcat服务器报错: Several ports (8005, 8080, 8009) required by Tomcat v5.5 Server at localhost are alre ...

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

    windows server2008下如何更改MySQL数据库的目录的帖子已经很多了,这里简单介绍一个步骤,如果不成功请先查看其它帖子. 更改默认的mysql数据库目录 将 C:\Documents ...

  5. 启动安卓模拟器报错 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 accelerat ...

  6. 【从翻译mos文章】Weblogic AdminServer 启动fail,报错&quot;unable to get file lock, will retry&quot;

    Weblogic AdminServer 启动fail,报错"unable to get file lock, will retry" 参考原始: Weblogic AdminSe ...

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

    每天开机之后,启动MYSQL Notifier就报错,第一次出现重启电脑后解决,后面的几天老是出现,重启电脑好几次都没有解决,感觉很烦人,一定要搞定这个问题找到原因,于是有了下文....... 启动M ...

  8. springboot 启动的时候报错 Error creating bean with name 'solrClient'

    springboot 启动的时候报错: org.springframework.beans.factory.BeanCreationException: Error creating bean wit ...

  9. 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   我的启动配置如下 {   ...

  10. 【IntellJ IDEA】idea启动测试类报错Error running 'Test1.test': Command line is too long. Shorten command line for Test1.test or also for JUnit default configuration.

    idea启动测试类报错 Error running 'Test1.test': Command line is too long. Shorten command line for Test1.tes ...

随机推荐

  1. SpaceVim中vimproc的vimproc_linux64.so未找到

    vimproc是我使用的SpaceVim中自动安装的插件,在启动时出现了"找不到dll文件"的提示,通过查阅官网( https://github.com/Shougo/vimpro ...

  2. django引入模板时,部分css文件渲染不成功失灵引入不成功

    今天碰到了一件怪事,下载好的模板,在webstorm中就好好地,但是一引入到pycharm的django项目中就各种失灵,位置错乱. 检查一番,发现该设置的都设置对了啊,而且js文件和css文件还有一 ...

  3. 第三十二篇-NavigationView导航抽屉的使用

    效果图: 导航抽屉所用到的布局是DrawerLayout,可以在里面添加一个线性布局和TextView组件,TextView组件的文本信息就是"主页面".然后和线性布局平行添加一个 ...

  4. 第五节,Neural Networks and Deep Learning 一书小节(中)

    在这一节,我们对上一个程序(Network1.py)进行了优化 3.改进神经网络的学习方法 (1)交叉熵代价函数的引入 Network1程序采用了S型神经元,S型神经元存在一个问题,当输出层神经元的输 ...

  5. jenkins学习:jenkins的基本配置

    _(:з)∠)_,发现写了gitlab和maven ,但是jenkins的详细步骤没有. 这里整理一下. 1.下载jenkins的war包,无需FQ. 网址:https://jenkins.io/do ...

  6. HTML学习笔记Day11

    一.CSS文档统筹 (一)网页自身的优化 (二)CSS规范 1.命名方法(语义化命名,结构化命名) ID:结构化    header footer class: .border0    . red:  ...

  7. Explicit Constructors(显式构造函数)

    按照默认规定,只有一个参数的构造函数也定义了一个隐式转换,将该构造函数对应数据类型的数据转换为该类对象,如下面所示:class String {String ( const char* p ); // ...

  8. 线程相关函数(1)-pthread_create(), pthread_join(), pthread_exit(), pthread_cancel() 创建取消线程

    一. pthread_create() #include <pthread.h> int pthread_create(pthread_t *thread, const pthread_a ...

  9. Luogu P3254 圆桌问题

    题目链接 \(Click\) \(Here\) 水题.记得记一下边的流量有没有跑完. #include <bits/stdc++.h> using namespace std; const ...

  10. Luogu2495[SDOI2011]消耗战

    题目描述 在一场战争中,战场由\(n\)岛屿和\(n-1\)个桥梁组成,保证每两个岛屿间有且仅有一条路径可达.现在,我军已经侦查到敌军的总部在编号为\(1\)的岛屿,而且他们已经没有足够多的能源维系战 ...