Avatar of Eric Donaldson
Eric Donaldson
 asked on

Linux SSH Error

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.
Linux NetworkingLinux DistributionsLinux

Avatar of undefined
Last Comment
arnold

8/22/2022 - Mon
ldvhai

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
Eric Donaldson

ASKER
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?
arnold

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.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Eric Donaldson

ASKER
just ssh from a linux vm
arnold

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.....
Eric Donaldson

ASKER
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
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Eric Donaldson

ASKER
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
Eric Donaldson

ASKER
Actually I did figure it out, do you know why it would add itself to hosts.deny file?
ASKER CERTIFIED SOLUTION
arnold

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.