Enable SSH server on Backtrack 5 r2


The SSH server is pre-installed , we just need to configure it before we can fire it up. The first thing we need to is generate the ssh keys by running:

root@bt:~# sshd-generate Generating public/private rsa1 key pair. <--- blablabla --- > Generating public/private rsa key pair. Your identification has been saved in /etc/ssh/ssh_host_rsa_key. Your public key has been saved in /etc/ssh/ssh_host_rsa_key.pub. <--- blablabla --- > Generating public/private dsa key pair. Your identification has been saved in /etc/ssh/ssh_host_dsa_key. Your public key has been saved in /etc/ssh/ssh_host_dsa_key.pub. <--- blablabla --- >

Now that we have generated the ssh keys we canĀ  start the SSH server.

root@bt:~# /etc/init.d/ssh start * Starting Secure Shell server sshd [ OK ]

You can verify whether the server has started by issuing a netstat command.

root@bt:~# netstat -ntlp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 3690/sshd <--- blablabla --->

To start the SSH server when Backtrack start run: update-rc.d -f ssh defaults