SSH, be vewy,vewy, quiet

The first service I like to get up and running is ssh. That is the Secure Shell. What's so great about ssh? Well, I like to log into my computer from work and kill some time playing around with adding new software, updates, checking my email, etc. Anything you can do from the command line while sitting in front of your computer can be done through ssh. If you have a Windows computer at work, you can use a great free program called PuTTY from here http://www.chiark.greenend.org.uk/~sgtatham/putty/ to connect to your computer when you are all done. On to the setup.

First off, let's see if ssh is already working

ssh localhost

Did it tell you about an RSA Fingerprint and ask you for a password? Congratulations!!! Ssh is already set up on your computer. Not so lucky? That's OK, it's easy as pie to get things cranked up. Type:

chmod +x /etc/rc.d/rc.sshd

to make sure that sshd is running when you boot your box. Then, type:

/etc/rc.d/rc.sshd start

to get things going right now. You shouldn't have to do anything else. Your user names are the same as the usernames on your computer, and the passwords are the same, too.

Now this is a contribution from Bebo over at http://www.linuxquestions.org It seems that the default set up for sshd uses two different protocols, an old, busted, insecure one (1) and the shiney, new, secure one (2). Turns out, if protocol 2 isn't working, sshd will fall back to protocol 1. Well that's no good. Here's how we're gonna fix it. Fire up the ol' text editor and open the file /etc/ssh/sshd_config. We are gonna change the part that looks like this:


#Port 22
#Protocol 2,1
#ListenAddress 0.0.0.0
#ListenAddress ::

To look like this


#Port 22
Protocol 2
#ListenAddress 0.0.0.0
#ListenAddress ::

Now, you just have to restart sshd.


/etc/rc.d/rc.sshd stop
/etc/rc.d/rc.sshd start

Now I've never had any trouble with ssh, so if you're having some problems, let me know so that I can type some more about it.

Valid HTML 4.01! Valid CSS!