Friday 12 September 2014

Install and Configuration OpenSSH in FreeBSD

SSH is a secure version of telnet. It’a a protocol used to access the console or command line for remote system.

1. Installation

localhost# cd /usr/ports/security/openssh-portable

localhost# make config ; make install clean

2.  Configure

localhost# cp /etc/make.conf /etc/make.conf.old

localhost#  echo “NO_OPENSSH = YES” >> /etc/make.conf

localhost# cd /etc/ssh/

localhost# cp sshd_config sshd_config.old

localhost# cp sshd_config-dist ssh_config

localhost# /etc/rc.d/sshd restart

Stopping sshd.

Starting sshd.

localhost#ee /etc/rc.conf

add command :  sshd_enable=”YES”

this command is used to start ssh automatically

3. Testing

localhost# telnet localhost 22

Trying 127.0.0.1…

Connected to localhost.

Escape character is ‘^]’.

SSH-2.0-OpenSSH_5.1p1 FreeBSD-openssh-portable-overwrite-base-5.1.p1,1

press enter to quit. You should now be able to connect with any SSH-capable client and any valid user account other than root.

No comments:

Post a Comment