Saturday, February 21, 2009

SSH and Ubuntu

So I installed Linux on one of my servers a few days ago. I went with Ubuntu 8.04 (aka Hardy Heron) instead of the most recent release 8.10 (aka Intrepid Ibex) because I've heard that there some stability issues with Intrepid and because Hardy is an LTS (long term support) release. I do have some hopes to make this into a real working LAMP server, but I installed the desktop version so I could have a GUI to play around with if I want to.

Today I wanted to SSH into my Ubuntu machine and it turns out that Ubuntu doesn't ship with SSH preinstalled, much to my suprise. Luckily, its a super simple install process. Less than 5 minutes of searching on Google provided me with this command: "sudo apt-get install openssh-server". And thats all there is to it, SSH is now running nicely on my Ubuntu machine.

But wait there's more, I just learned a fun new Terminal command for use with SSH. I knew that SSH gives you command line access to the server, and that SFTP uses SSH to transfer files much like an encrypted version of FTP. But what I didn't know how to do was transfer files using the command line. Enter SCP. Syntax for using scp is "scp [path to file] [username]@[server address]:[path to destination]". So when I wanted to transfer a tmp.txt file from the desktop of my laptop to the documents directory on my Ubuntu machine, I typed "scp ~/desktop/tmp.txt myusername@ubuntu:~/Desktop". Don't forget that Ubuntu's ext3 filesystem is case sensitive.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.