Website files through SSH
Control panel, FTP, CMS..isn't there a more technical, more intricate way to work with a website's files? Yes, yes there is.
SSH stands for SecureShell. SSH is a protocol that allows you to connect to your web server and execute commands on a command line as if you were actually in front of it. You can execute the commands necessary for working with files (edit, rename, delete, etc.), and you can also execute commands that do things far beyond just working with files.
With SSH, you are after all connected to the command line of a web server so there is alot you can do. If you're a crazy hardcore computer geek then SSH might be for you!
Support for SSH
Before getting all excited at the prospect of working from your web server's command line make sure your web hosting company has support for SSH. Check the features list of their hosting packages on their website or call them and ask them.
Two types of SSH
Having SSH access doesn't mean you can do anything you want on the command line. There are limits based on type of hosting account.
Limited SSH
If you're running a shared hosting account you will have limited SSH access. You will be able to work with your files, move around from directory to directory, execute a few basic commands, but that's about it.
Full SSH
If you're running a dedicated hosting account on a dedicated server you could get full SSH access (depending on the hosting company). You will be able to work with your files, move around from directory to directory, and execute much much more commands on the command line. You will be able to do virtually anything on your web server through a command line as if you were sitting in front of it.
NOTE: Be careful when using SSH. You will after all, be executing commands on the computer that houses your website. If you make a wrong move your website can stop functioning correctly. If you're not sure of what you're doing in SSH, don't do it. Stick to what you know and what you feel confident in doing.
SSH software
To use SSH you will have to download and use SSH software. A popular software program for using SSH is Putty. Download Putty, open it, and use the on-screen instructions to access your web server from it.
Another SSH program you can use is Absolute Telnet/SSH. Absolute Telnet/SSH has built-in SSH, SFTP, and Telnet capabilities.
Here are some commands you can use on the command line in SSH:
-
pwd
Prints the name of the directory you are currently in -
ls
Lists the contents of the directory you are currently in -
cd [nameOfDir]
Changes directory to the directory you specify with nameOfDir
Example: cd htmlPages (will change to the htmlPages directory) -
nano [nameOfFile]
Opens a file for editing specified by nameOfFile
Example: nano index.html (will open index.html for editing)