SSH
From Site5Wiki
SSH is short for Secure SHell. SSH allows customers direct access to the Linux command line. SSH access on Site5 is disabled by default on all accounts, for internal security purposes.To use SSH with your Site5 account, simply click the enable SSH option contained within your Site5 control panel.
By default, all accounts will use the bash shell.
Contents |
Freeware SSH Clients and Tools by Platform
- Macintosh OSX
- Fugu
- Son of Fugu
- SSH Agent
- SSHKeychain
- sshfs (ssh file system that fully integrates into the Finder. Requires installation of 1 other package.)
- Macintosh OS9
- Unix/Linux
- Windows
Some Of The Most Commonly Used SSH/Shell Commands
Commands,
cd : change directory · · cd /usr/local/apache : takes you to /usr/local/apache/ directory. cd ~ : go to your home directory. cd - : go to the last directory you were in. cd .. : go up one directory.
cp : copies a file.
grep : looks for text in files.
ln : create's symbolic links. ln -s foo1 foo2 Creates a symbolic link to foo1 with the name of foo2.
ls : Lists the contents of a directory. ls -al : shows all files even files that start with a .(dot) permissions, owners, size, and when last modified.
rm : deletes a file. rm image.jpg: deletes image.jpg will ask for confirmation before deleting. rm -f image.jpg: deletes image.jpg, will not ask for any confirmation. rm -rf images/ : deletes the folder images, and all files in it, including subdirectories. DANGEROUS BE CAREFUL WITH THIS COMMAND!!!!!!
tail : like the name implies reads the end of a file.
touch : create an empty file. touch /home/account_name/public_html/index.html : create an empty file called index.html in the directory /home/account_name/public_html/.
top : see currently running processes and other information like memory and CPU usage with real time updates.
Setup SSH access with SSH keys -- No passwords for login
So, you're tired of putting your password in to SSH to gain access? You ask, "Isn't there a way so that this can be secure but still not require me to input a password?" Indeed, there is a way. That way is using SSH keys and the following will detail how to setup it up.
PuTTY
Setting it up with PuTTY is easy as a few clicks.
- Make sure you have all of PuTTY's applications -- you'll specifically need PuTTY, Pageant, PuTTYgen.
- Launch "PuTTYgen"
- Click "Generate" button to start the key generation process
- Input a comment -- something useful but short
- Input a passphrase -- the private key will encrypted and it's important to have a passphrase
- If you're sure no will ever get access to your private key, then you can leave the passphrase out. If you do this, however, you may want to put the private key file on a USB flash drive or something external from your computer and in a safe place.
- Click the "Save public key" button and save the public key to the desktop -- for easy access
- Click the "Save private key" button and save in a safe and secure place -- it's important never to give this key to anyone and do NOT store it on the server.
- Login to SSH using your password
- Type the following command:
- nano ~/.ssh/authorized_keys
- Open the public key file and copy ALL the contents (Control C)
- Go back to PuTTY and right click the mouse -- this will paste the public key in.
- Save the file by doing "Control O" and exit nano by doing "Control X"
- Logout of SSH
- Launch "Pageant"
- Click "Add key" button and navigate to the private key file.
- If you inputted a passphrase, it will ask for it at this point.
- Open PuTTY and login to SSH -- It should ask for the user but then it should login using the SSH key.
- You're done, congrats! Now if you want to login to multiple accounts using the SSH key, just copy the public key file to the other accounts and login as usual.
Books We Recommend
SSH, The Secure Shell: The Definitive Guide, Second Edition, by Daniel J. Barrett, Richard E. Silverman, and Robert G. Byrnes ISBN 9780596008956
:
- Find this book at
O'Reilly
- Find this book at
Barnes & Noble
- Find this book at
BooksPrice
- Find this book at
InformIT
- Find this book at
Powells' Books
Related wiki entries: Move_Website_via_SSH; Backup/Restore_MySQL_via_SSH; Apache; FTP; SFTP
