Kvm启动ubuntu虚拟机无法ssh
来源:互联网 发布:java生成json数组 编辑:程序博客网 时间:2024/05/16 11:07
1. ssh:Connection refused
1) ssh 120.0.0.11 Connection refused
root@node2:/opt/zq# ssh ubuntu@120.0.0.11ssh: connect to host 120.0.0.11 port 22: Connection refused
2. ubuntu虚拟机安装openssh-server
1) apt-get安装,如果提示无法安装,找不到源,那么apt-get update
apt-get install openssh-server
2) 如果,更新源还是不可以,则修改源路径:
vi /etc/apt/sources.list
修改如下:
deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiversedeb http://cn.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiversedeb http://cn.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiversedeb http://cn.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
3. WARNING: IDENTIFICATION HAS CHANGED!
1) ssh远程无法登陆,提示验证。首先确保登录用户为root权限。
root@node2:/opt/zq# ssh 120.0.0.11@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!Someone could be eavesdropping on you right now (man-in-the-middle attack)!It is also possible that a host key has just been changed.The fingerprint for the ECDSA key sent by the remote host isa1:d1:fe:08:87:87:e0:0f:64:d1:fa:0b:7a:28:09:78.Please contact your system administrator.Add correct host key in /root/.ssh/known_hosts to get rid of this message.Offending ECDSA key in /root/.ssh/known_hosts:37 remove with: ssh-keygen -f "/root/.ssh/known_hosts" -R 120.0.0.11ECDSA host key for 120.0.0.11 has changed and you have requested strict checking.Host key verification failed.
2) 开启ssh远程权限
vi /etc/ssh/ssh_config
ubuntu版本不同该文件有所区别:
http://blog.csdn.net/qiqishuang/article/details/51547884
修改如下:
Host *# ForwardAgent no# ForwardX11 no# ForwardX11Trusted yes# RhostsRSAAuthentication no# RSAAuthentication yes PasswordAuthentication no# HostbasedAuthentication no# GSSAPIAuthentication no# GSSAPIDelegateCredentials no# GSSAPIKeyExchange no# GSSAPITrustDNS no# BatchMode no# CheckHostIP yes# AddressFamily any# ConnectTimeout 0# StrictHostKeyChecking ask# IdentityFile ~/.ssh/identity# IdentityFile ~/.ssh/id_rsa# IdentityFile ~/.ssh/id_dsa Port 22# Protocol 2,1# Cipher 3des# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc# MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160# EscapeChar ~# Tunnel no# TunnelDevice any:any# PermitLocalCommand no# VisualHostKey no# ProxyCommand ssh -q -W %h:%p gateway.example.com# RekeyLimit 1G 1h SendEnv LANG LC_* HashKnownHosts yes GSSAPIAuthentication yes GSSAPIDelegateCredentials no
3) 依然无法登陆,则有以下几种解决方案:
- Just delete the known_hosts file If you have only used one ssh server
mv /root/.ssh/known_hosts /tmp
- Add correct host key in /home/user/.ssh/known_hosts
http://www.cyberciti.biz/faq/warning-remote-host-identification-has-changed-error-and-solution/
4. ssh正确登陆姿势
1) 不正确姿势:ssh 120.0.0.11
root@node2:/opt/zq# ssh 120.0.0.11The authenticity of host '120.0.0.11 (120.0.0.11)' can't be established.ECDSA key fingerprint is a1:d1:fe:08:87:87:e0:0f:64:d1:fa:0b:7a:28:09:78.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added '120.0.0.11' (ECDSA) to the list of known hosts.root@120.0.0.11's password: Permission denied, please try again.root@120.0.0.11's password: Permission denied, please try again.root@120.0.0.11's password: Permission denied (publickey,password).
2) 正确姿势:ssh ubuntu@120.0.0.11
root@node2:/opt/zq# ssh ubuntu@120.0.0.11ubuntu@120.0.0.11's password: Welcome to Ubuntu 14.04.3 LTS (GNU/Linux 3.19.0-25-generic x86_64) * Documentation: https://help.ubuntu.com/ System information as of Tue May 31 02:59:19 EDT 2016 System load: 0.22 Memory usage: 3% Processes: 83 Usage of /: 5.0% of 17.34GB Swap usage: 0% Users logged in: 0 Graph this data and manage this system at: https://landscape.canonical.com/0 packages can be updated.0 updates are security updates.Last login: Tue May 31 02:59:19 2016
0 0
- Kvm启动ubuntu虚拟机无法ssh
- Kvm启动ubuntu虚拟机无法联网
- kvm虚拟机实例网络无法启动一例
- KVM直接启动虚拟机
- kvm 虚拟机的启动
- Ubuntu安装KVM虚拟机
- QEMU-KVM无法启动
- Ubuntu下无法启动Android虚拟机错误
- KVM虚拟机无法连网分析
- qemu-kvm 创建ubuntu 虚拟机
- ubuntu下安装kvm虚拟机
- ubuntu使用KVM创建虚拟机
- 使用ssh无法连接虚拟机linux系统,ubuntu。
- Windows里的虚拟机迁移到KVM无法启动是何原因?
- ssh连接ubuntu虚拟机
- [ubuntu]升级内核之后虚拟机vittualbox无法正常启动开机
- KVM创建虚拟机后指定启动脚本
- kvm启动虚拟机流程(1)
- 第14周阅读程序1(3)
- 如何暂停和恢复CALayer上的动画
- Oracle EXP-00091解决方法
- hdu-2037-今年暑假不AC-简单DAG
- 等价二叉树
- Kvm启动ubuntu虚拟机无法ssh
- 模式识别学习笔记(十六)--非线性分类器
- BZOJ 1588 营业额统计 Splay
- android中设置ListView的选中的Item的背景颜色
- 字符串函数原型
- android安全退出所有activity
- CSS3创建H5预载动画效果
- 快速幂
- 稳定排序和不稳定排序