先说下遇到的相关情况吧 在使用putty连接Ubuntu的时候,提示:Connection error : Connection timed out 意思是连接超时了!~ 后来我在网上查了下说是之前安装的ssh协议 重启之后,ssh服务没有启动, 好吧,启动下ssh服务 service sshd start 或者是 /etc/init.d/ssh start 启动之后,发现了这个提示 Could not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_dsa_key 这个意思我也不太懂,可能是两个文件不存在吧 然后在网上搜索了下,使用以下的命令进行重建下这两个文件 在终端中输入:ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key重新建立ssh_host_dsa_key文件 以下是返回信息
Generating public/private dsa key pair. Enter passphrase (empty for no passphrase):(直接回车) Enter same passphrase again: Your identification has been saved in /etc/ssh/ssh_host_dsa_key. Your public key has been saved in /etc/ssh/ssh_host_dsa_key.pub. The key fingerprint is: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx root@localhost.localdomain 在终端中输入:ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key重新建立ssh_host_rsa_key文件 以下是返回信息 Generating public/private rkey pair. Enter passphrase (empty for no passphrase):(直接回车) Enter same passphrase again: Your identification has been saved in /etc/ssh/ssh_host_rsa_key. Your public key has been saved in /etc/ssh/ssh_host_dsa_rey.pub. root@localhost.localdomain 注意:上面的两条命令,在普通用户下不起作用,需要使用root权限 而默认情况下root是禁用的。可以使用下面的命令来启用root帐号 在普通用户的终端命令行下面输入 sudo passwd root (回车) 输入两次密码确认下 最后,再使用上面启动ssh服务的方法,启动下就ok了 Ubuntu 下 SSH 设置Linux 备份文件和数据库发送到邮箱相关资讯 putty
- PuTTY实现Windows向Linux上传文件 (08月07日)
- PuTTY 0.67 Beta 发布下载,SSH/ (03月06日)
- PuTTY + Xming 实现Oracle图形安装 (08/04/2015 09:00:21)
| - PuTTY配置详解 (07月25日)
- PuTTY+Xming实现X11的ssh转发 (10/09/2015 13:11:04)
- 使用PuTTY密钥认证机制远程登录 (03/13/2015 12:08:04)
|
本文评论 查看全部评论 (0)