fbpx
Call us +1-231-421-7160

Using Secure Shell (SSH)

For advanced users we offer Secure Shell (SSH) access, a feature that allows you to perform rapid tasks directly on the server. It can speed up many tedious processes that can be time consuming when using FTP. 

What is Secure Shell (SSH)?

Using PuTTY

Accessing SSH Login Credentials

Common SSH Commands

What is Secure Shell (SSH)

According to Wikipedia, SSH "is a cryptographic network protocol for secure data communication, remote command-line login, remote command execution, and other secure network services between two networked computers that connects, via a secure channel over an insecure network, a server and a client (running SSH server and SSH client programs, respectively). The protocol specification distinguishes between two major versions that are referred to as SSH-1 and SSH-2."

Using PuTTY

In most cases, we suggest that you use PuTTY to perform SSH commands. According to Putty.org, "PuTTY is an SSH and telnet client ... [and] open source software that is available with source code and is developed and supported by a group of volunteers." Essentially, PuTTY is a network file transfer application that supports multiple network protocols including SSH. Download PuTTY here.

Accessing SSH Login Credentials

To access your SSH login details, log into your Cloud Control Panel™(CCP). Select the product you'd like to work with and click on the FTP, SFTP, SSH icon in the CCP.

ssh1

In the following window, you'll be able to access your Login Information.

Common SSH Commands

  • change directories into home directory
cd ~
  • tar a directory and compress with gzip * most common method
tar -zcvf backupname.tar.gz *
  • tar a directory and compress with bzip2
tar -jcvf backupname.tar.bz2 *
  • decompress a tar.bz2 to a .tar file
bunzip2 -d filename.tar.bz2
  • decompress a .tar.gz or .tgz file to a tar file * most common method
gzip -d filename.tar.gz
  • untar directory
tar -xvf backupname.tar
  • unzip a file in working directory
unzip filename.zip
  • print working directory
pwd
  • find out the current username
whoami
  • wget, * quotation marks are important to properly escape the url
wget “http://domainname.com/filename.txt”
  • edit cron a job using nano
env EDITOR=nano crontab -e
  • check cron
crontab -l
  • disk usage per directory
du --max-depth=1 -h
  • count how many files are in a directory
ll|wc -l
  • import DB
mysql -h db -u username -p dbname < filename.sql
  • scp will override files, be sure to use a clean or safe working directory while copying
  • remote file copying: pushing a file from the working directory to a remote home directory, will prompt for the remote password.
scp filename username@host:~/filename
  • remote file copying: pulling a file from remote home directory into the working directory, will prompt for the remote password.
scp username@host:~/filename filename
  • copy a local directory
cp -R olddirectory newdirectory

Do you have suggestions for improving this article?  

We take a great deal of pride in our knowledgebase and making sure that our content is complete, accurate and useable. If you have a suggestion for improving anything in this content, please let us know by filling out this form. Be sure to include the link to the article that you'd like to see improved. Thank you!