Solved

Linux SSH Error

Posted on 2016-08-09
9
94 Views
Last Modified: 2016-08-15
Hi,
I cannot ssh at all into a ubuntu vm.  I have the error:  ssh_exchange_identification:  Connection by remote host

I am not able to connect at all.  Let me know if you know a way to fix this.
0
Comment
Question by:Eric Donaldson
  • 5
  • 3
9 Comments
 
LVL 2

Expert Comment

by:ldvhai
ID: 41749690
Hi Eric Donaldson,
Can you access vm console? if possible you can try:
1. check your firewall
2. check port ssh.
3. check /etc/hosts.deny and /etc/hosts.allow
4. Try to access to vm with normal user, not root.
5. run command ps aux | grep sshd and check MaxSessions in ssh server
0
 

Author Comment

by:Eric Donaldson
ID: 41749731
Ok, thanks - I am able to ssh in from a different server, it seems to re-import the fingerprint from the server.  How can I remove the fingerprints from the other servers so I can login from my nomal pc?
0
 
LVL 77

Expert Comment

by:arnold
ID: 41749740
You need to delete the record for the IP from the known keys.  what software are you using to ssh?
on linux, .ssh/known_hosts is where you will find the IP/Hostname matching key that needs to delete.
0
 

Author Comment

by:Eric Donaldson
ID: 41750232
just ssh from a linux vm
0
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

 
LVL 77

Expert Comment

by:arnold
ID: 41750301
your responses need to be more detailed.
ssh -vvvvvvv user@server

vm to vm might run into issues within the host's attempt to handle the packet flows between the VM as well as scheduling.....
0
 

Author Comment

by:Eric Donaldson
ID: 41755576
Ok, when I ssh from the other linux host, I get:

ssh_exchange_identification:  Connection Closed by remote host

I am not sure how to get around it.  It did used to ssh without an issue.

Thanks
0
 

Author Comment

by:Eric Donaldson
ID: 41755778
Also I did try this from the host I am connecting from, but it did not work either:

http://www.lifewithtech.net/blog/tip-one-liner-command-remove-bad-ssh-key
0
 

Author Comment

by:Eric Donaldson
ID: 41755796
Actually I did figure it out, do you know why it would add itself to hosts.deny file?
0
 
LVL 77

Accepted Solution

by:
arnold earned 500 total points
ID: 41755830
if you use iptables and rules that auto-add systems/ips based on criteria that views the repettitive connection as an attack.

without an audit to see who, when the hosts.deny file was altered.
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VMWare 6 crashing 14 98
AWS CLI - Issue with name display 2 51
Linux Copy Command - All Files inc Directory 1 32
Setting up static IP - Ubuntu server 16.04 12 32
This document is written for Red Hat Enterprise Linux AS release 4 and ORACLE 10g.  Earlier releases can be installed using this document as well however there are some additional steps for packages to be installed see Metalink. Disclaimer: I hav…
This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now