问题描述
在使用docker centos镜像时,生成公钥失败,解决办法也适用于其他情况
问题原因
就是没有安装ssh
解决方法
安装ssh,我的是centos系统,使用命令 yum install openssh, 如果是其他系统如 ubuntu 使用 apt-get install openssh安装,如果不能安装,可以尝试yum update 或者 apt-get update,使用 upgrade 替
代 update 也可以
update 和 upgrade 区别:
yum update:升级所有包同时也升级软件和系统内核
yum upgrade:只升级所有包,不升级软件和系统内核
安装ssh
yum install openssh