Solved

Linux SSH Error

Posted on 2016-08-09
9
68 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 76

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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 76

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 76

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

747 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

9 Experts available now in Live!

Get 1:1 Help Now