Secure Shell, ssh

The Secure Shell is basically an encrypted telnet, but it can do a lot more than telnet ever could such as tunnelling encrypted connections both in forward and reverse directions. Both clients and servers are available SSH on many operating systems.

System Banner

Also on the security front, further down sshd_config, consider adding a banner warning stating that the system is private and not for public access. In the unlikely event you are hacked and catch the culprit you will have a stronger legal case if you have told any intruders that they should not be there.

# banner path
Banner /etc/issue

/etc/issue is displayed on a console before login, sometimes a /etc/ is present in case you want to have a different warning for local console users compared to network login users. Bear in mind that ssh -q will not show a banner so don't rely on just this alone as a security warning.

/etc/motd (Message Of The Day) is displayed after a successful login, so any system specific info should go there and not in /etc/issue.

After having done this change, you will need to stop (not just restart sshd) with /etc/rc.d/rc.sshd stop and /etc/rc.d/rc.sshd start

And the result? Success!!

zeus:~ andrewst$ ssh -l andrew
andrew@'s password: 
Last login: Tue Apr 20 00:56:35 2004 from
Linux 2.4.25.
Welcome to Slackware!

Enable TCP keep alives

Add the following to /etc/ssh/sshd_config to prevent inactivity causing a firewall terminating a session:-

TCPKeepAlive yes
KeepAlive yes
ClientAliveInterval 60

SSH tunnels

ssh -L -p 443

ssh -L -L -p 443

Socks Server

ssh -D 1080 -p 443

ssh key authentication with LDAP

linux/ssh.txt · Last modified: 2021/01/31 15:09 by andrew