Fails of SSH connection

SSH connection refused by remote host in some times, due to the operation by mistake.

for example ,someone may have executed “chmod -R 777 /home”

Connecting to 192.168.18.137:22…

Connection established.

To escape to local shell, press ‘Ctrl+Alt+]’.

Connection closed by foreign host.

Disconnected from remote host(hadoop3) at 14:37:11.

Type `help’ to learn how to use Xshell prompt.

You can do the following operation:

[plain] view plain copy

cd /etc/ssh

sudo chmod 644 ./*

sudo chmod 600 ssh_host_dsa_key

sudo chmod 600 ssh_host_rsa_key

sudo chmod 755 .

/etc/init.d/sshd restart

And then you can try again.

another possible reason is that there is no spare thread to create.

you can view message log, to check whether there exist thread create failed,

as shown in the following figure.

thread_create_failed

So ,there is a need to troubleshoot why this server can not create new thread and sloved it .

Leave a Reply