How do I install ssh under Linux operating systems?
Linux operating system comes with OpenSSH client and server as follows from OpenBSD project:
[a] ssh - SSH client act as remote login program.
[b] sshd - SSH server (Daemon) act as server which provide secure encrypted communications between two untrusted hosts over an insecure network. sshd listens for connections from clients (default ssh tcp port # 22). It is normally started at boot from /etc/init.d/ssh or /etc/init.d/sshd script. It forks a new daemon for each incoming connection. The forked daemons handle key exchange, encryption, authentication, command execution, and data exchange.
How do I install ssh under RHEL / SL (Scientific Linux) / CentOS / Fedora Linux?
Type the following yum command to install ssh client and server:
# yum -y install openssh-server openssh-clients
Start and enable sshd server:
# chkconfig sshd on
# service sshd start
Open port 22 for all IP address, enter:
# /sbin/iptable -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
# service iptables save
You can set an appropriate network block/mask, representing the machines on your network which must be allowed to access this SSH server. In this example open port 22 to only subnet 192.168.1.0/24:
# /sbin/iptables -A INPUT -s 192.168.1.0/24 -m state --state NEW -p tcp --dport 22 -j ACCEPT
# service iptables save
To configure OpenSSH server edit /etc/ssh/sshd config file. Please go though these recommendations to improve security of SSHD server. You can also go through sshd_config(5) man page for more detailed information:
$ man 5 sshd_config
How do I install ssh under Ubuntu / Debian Linux?
See our "Debian Linux Install OpenSSH SSHD Server" article for more information.
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop














{ 0 comments… add one now }