Showing posts with label ssh. Show all posts
Showing posts with label ssh. Show all posts

Thursday, July 26, 2012

Speeding up SSH logon


A firewall blocks port 53 for my servers so ssh is trying to resolve my address every time I attempt log in.

The timeout is frustrating, so I read the man page [1] and found this configuration directive

  UseDNS  Specifies whether sshd(8) should look up the remote host name and check that the resolved host name for the remote IP address maps back to the very same IP address. The default is ''yes''.

I set it to 'no' and restarted the service and it worked like a charm :D

Note:
  When working on OpenBSD, be sure to be logged in on the console by other method (like physical console access or serial) because restarting the ssh service on OpenBSD causes all remote sessions to be closed.

[1] http://linux.die.net/man/5/sshd_config

--
  = ^ . ^ =

Sunday, September 18, 2011

ssh write failed: broken pipe

I hate when this kind of things so I surfed the net looking for an answer [1], the cause of the problem was the inactivity in the ssh session, so a keep-alive must be implemented somewhere.

It turned out in the manpages of ssh_config and sshd_config there were a couple keep alive settings:

/etc/ssh/ssh_config
ServerAliveInterval 30
TCPKeepAlive yes

/etc/ssh/sshd_config
ClientAliveInterval 30
TCPKeepAlive yes

Server/Client Alive interval are protocol-specific settings, and TCP is a connection-specific setting.

[1] https://bbs.archlinux.org/viewtopic.php?id=97003

[2] LIDSOL website

init 0 ;