LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Can't SSH to remote machine: Connection closed by remote host (https://www.linuxquestions.org/questions/linux-networking-3/cant-ssh-to-remote-machine-connection-closed-by-remote-host-267052/)

bbk 03-18-2007 05:28 AM

resolution
 
...at me, the same problem occured in a freshly installed linux. The solution was to configure the /etc/hosts.deny because it had by default an
ALL: PARANOID
line in it which prevented me to log in from my notebook (which actually was not having a reverse lookup-enabled domain name - ip address pair).

Anyway, this was the simple problem with it.

For a workaround, when you can't get into your system from a previous DHCP enabled machine try logging onto another server having a fixed IP-DNS pair and try logging onto your server from there possible with much higher success ratio and you can fine tune your /etc/hosts.deny file from there...

BBK

karunakarpn 09-18-2007 06:13 AM

solution for ssh_exchange_identification problem
 
I solved this problem. This occured because of changing permissions in /var/ folder.This may be one reseason for you.

so now change permissions to
chmod -R 755 /var/

Now i got resolved this problem.
-Thanks

soroccoheaven 09-18-2007 08:29 AM

sorry wrong posting.

Kostanos 09-26-2007 05:34 PM

Be careful the /var can has /var/www or other folders that probably will have other permissions.
For get ssh working in my case I just did:
chmod 775 /var/run/sshd
chown root:root /var/run/sshd
/etc/init.d/ssh restart

In my Debian Etch.

avijitp 09-27-2007 12:38 AM

ssh login takes time
 
Some of my RHEL servers tends to respond very slow as we connect through ssh and take longer time to give login prompt. When I get authenticated and log in, it works as usual. Is there any reason for this ?

pds 01-16-2008 03:58 AM

Hi!

I had the same problem, then I foun that my /etc/inetd.conf had the following line:

ssh stream tcp nowait root /usr/sbin/tcpd /usr/bin/ssh

I commented the the line, restarted inetd and then it got ok.

kadhiravan.r 05-21-2008 11:20 AM

Are you able to login to the server locally using ssh.?

velocemente 06-08-2008 01:43 AM

ALL: PARANOID in /etc/hosts.deny
 
look and see if ALL: PARANOID in /etc/hosts.deny is uncommented.

fraser 06-24-2008 10:21 AM

hosts.allow
 
My configuration had
ALL : PARANOID : deny
in hosts.allow . Removing this line fixed the problem

nolinuxnollife 06-25-2008 02:46 AM

1)chek the firewall on the client machine

chek this link

http://lists.debian.org/debian-user/.../msg02345.html

cwilsonbell 11-11-2008 11:34 AM

Can't SSH to remote machine...
 
If you can log into the server via console. Try editing the /etc/hosts.allow file and adding:

ALL: 10.

or try adding:

ALL: <your subnet>

as the last line in the file.

deepumnit 07-09-2009 04:39 AM

Cannot set up an ssh tunnel from my localhost to a remote machine.
 
Hi all:

I am trying to set up an ssh tunnel from my machine (in India) to a server (in US). How do I do it? The problem is: I have to first create a tunnel to Server-1 and then another from Server-1 to Server-2. The point here is: I have to establish a tunnel from my machine to Server-2. Can you please help me establish one?

karsteb 10-26-2009 08:58 AM

Hi avijitp.

The reason it takes a long time to get the login prompt is usually that the host cannot resolve the DNS name of the client, so it waits until to reslove attempt times out and then proceeds. Solve this by making sure the client is resolvable by the DNS that the server connects to, or just manually add the client to the /etc/hosts file - it usually fixes things.

Guess the sshd tryes to resolve the name of the clients for logging purposes or something...

- Karsten

avijitp 10-26-2009 09:01 AM

I too had that idea and to test that I have also added the corresponding entry in the /etc/hosts file and it did not help. I tried and verbose option and it waits unusually long at the authorization phase.

ECRocker 11-02-2009 01:35 PM

Quote:

Originally Posted by bastard23 (Post 1354935)
What's in the logs on the server? It should give a reason.
Check /etc/hosts.allow and /etc/hosts.deny.

THANK YOU. Switching subnets and networks in the office and for days couldn't figure out why certain servers were pingable but just dropping ssh packets.

Code:

sshd: 10.0.1.


All times are GMT -5. The time now is 03:43 AM.