Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Apr 102010
 

SSH takes a long time to connect or log in

Answer

If you experienced slow SSH connect to a remote server, you can try to disable the reverse DNS lookup at the server.

1. Edit the sshd_config

# sudo vi /etc/ssh/sshd_config

2. Add the following line in sshd_config

UseDNS no

3. Restart sshd

# sudo /etc/init.d/ssh restart

Jan 082010
 

Prevent go way SSH session killing running job

Answer:

If you are executing a long running job over SSH session, when your SSH session is terminated for whatever reason, e.g. unstable network connection. Your long running job will die (it will receive a hangup/hup signal) when the SSH session was killed.

To overcome this, when executing long running job over SSH, use the following way

nohup program &