Website files through SSH
Using the control panel, FTP, or a Content Management System are all easy methods for working with your website's files. These methods require little to no technical knowledge. But if you're looking for a more technical way to work on your website's files, then SSH is for you.
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 sitting in front of your web server. You can execute the commands necessary for working with files (edit, rename, delete, etc.), and you can also execute other commands on the server that do things far beyond just working with files.
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.
Once you find out that your web hosting company supports SSH and its available on your account, get the info required from them to access your web server using SSH - Host name/IP address, port number, user name & password.
Two types of SSH
Having SSH access doesn't necessarily mean you can do anything you want on the command line. There are limits based on type of hosting account.
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.
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 much more. 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.
To use SSH you will need some SSH software. A popular program for SSH is Putty.
Another SSH program you can use is Absolute Telnet/SSH. Absolute Telnet/SSH has built-in SSH, SFTP, and Telnet capabilities.
Open your SSH program and input the required info to logon to your web server - Host name/IP address, port number, user name & password. Your web hosting company should provide you with the info if they support SSH.
Commands you can use on the command line in SSH
Connected and ready to go? Great! Now here are a few commands to get your started:
Prints the name of the directory you are currently in
Lists the contents of the directory you are currently in
Changes directory to the directory you specify with nameOfDir
Example: cd htmlPages (will change to the htmlPages directory)
Opens a file for editing specified by nameOfFile
Example: nano index.html (will open index.html for editing)