Site5 - Built For Designers & Developers MENU
Home  ›  Shell Access (SSH)  ›  SSH Overview

SSH Overview

14 Comments

Shell access, or SSH as its commonly referred to as, is remote command line access to a server. This allows you to run commands on our server without being physically present near the machine. Being able to run commands against your account can make moving and deleting large files/folders a breeze!

There are thousands of help guides for SSH out on the web so we are not going to try to teach you it, rather we will focus on providing you a SSH cheat sheet with common commands and advise you how you are able to connect to our service using SSH.

Note: All shared hosting (SiteAdmin) customers have SSH enabled by default. To utilize the SSH service, connect using the welcome letter provided FTP username/password to connect on port 22. HostPro +Turbo customers can utilize the Multi-Admin interface to enable/disable SSH access for the accounts created within it. cPanel customers, please contact our support team to have SSH enabled on your account(s).


Freeware SSH Clients and Tools by Platform


Most Commonly Used SSH/Shell Commands (SSH Cheat Sheet)

1. How to move into another directory
Use command below to change directory

cd [another directory]

example: move to directory “download”

cd download

2. How to go to home directory

cd ~

3. How go to the last directory you were in

cd -

4. How to go up a directory level

cd ..

5. How to show the full path of the current directory
Use this command to find out where are you currently in.

pwd

6. How to list files and/or directories in a directory

ls (just type ls and hit enter)

7. How to list all files and information

ls -al

8. How to list all files ending with certain extension

ls *.ext

example:

ls *.php

9. How to list all files and folders with detailed information including file size

ls -alh

10. How to quit and exit SSH client

exit

File Management

11. How to copy and rename file
Use this command to copy and rename a file

cp [filename] [new filename]

example: we’ll rename banner.jpg to banner728px.jpg

cp banner.jpg banner728px.jpg

example: we’ll copy banner.jpg to a folder called “ads”

cp banner.jpg ads/banner.jpg

example: copying and renaming at once

cp banner.jpg ads/banner728px.jpg

ps: original file will remain, it is just copied.

12. How to move and rename file
Use this command to move and rename file

mv [old filename] [new filename]

example: moving a file to another directory

mv banner.jpg ads/banner.jpg

example: moving a file to another directory and renaming it at once

mv banner.jpg ads/banner728px.jpg

The original file will be deleted as it was moved to another location and you can even move a folder using this method.

example: moving “image” folder to “media” folder

mv image/ media

example: moving “image” folder to upper directory

mv image/ ..

13. How to delete / remove a file

rm [file name]

example:

rm banner.jpg

14. How to delete / remove all files in current directory

rm *

15. How to delete files with certain extension

rm *.extension

example: remove all files with .jpg extension

rm *.jpg

16. How to copy a folder with all files and folders in it

cp -r [directory] [new directory]

17. How to create new folder

mkdir [folder name]

example:

mkdir image

18. How to search for a file starting within current directory

find . -name [filename] -print

example: find a file called “banner.jpg” in current folder

find . -name banner.jpg -print

19. How to search for text within a file

grep [text] [filename]

example: find the word “sidebar” in file index.php

grep sidebar index.php

20. CHMOD – how to change file permissions

chmod [permission type] [file/folder name]

example:

chmod 755 config.php

Available permission type: (below is not command)

First number is for the owner, second for the group, and third for everyone.

7 = Read + Write + Execute
6 = Read + Write
5 = Read + Execute
4 = Read
3 = Write + Execute
2 = Write
1 = Execute
0 = All access denied

Using SSH Keys

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.

Still have a question? Or need help?
If you need technical support with your account, please email us or chat live with a representative.

14 Comments

  • How to enable ssh in my account ?

    • Hello,

      For more recent accounts, SSH/Bash is enabled by default. If you are having issues connecting to SSH, please open a ticket with our support team so we can look into the issue for you.

  • How do you know your user name?

    • Hello John,

      The SSH username would be the same as your primary FTP account. If you are unsure of what your FTP username is, you can find it in the Account Information section of the Resource Usage page in SiteAdmin.

      For information on how to access this page, please see the following link…
      http://kb.site5.com/control/siteadmin/siteadmin-how-to-access-the-resource-usage-page/

      If you have any questions, please feel free to reply here or you can speak with our support team directly by opening a ticket through Backstage.

      Happy Hosting!

      • I found my main FTP user in the resource screen that is my ssh user . But it apparently has a different password than my site5.com login user. I can’t find where to change the password in the portal for that user. You can’t edit that user from FTP screen. Thanks

        • I hope this reply finds you well!

          The password for your primary FTP account is linked to your SiteAdmin/cPanel login credentials. Keep in mind that SiteAdmin/cPanel and Backstage have different logins.

          For information on how to change your SiteAdmin or cPanel (depending on the service you have with us), please see one of the two following links…

          http://kb.site5.com/control/siteadmin/siteadmin-how-to-change-your-password/
          http://kb.site5.com/control/cpanel/cpanel-how-to-change-your-password/

          If you are still having problems, please feel free to contact our support team and we will be more than happy to help you recover your credentials.

          • The links in this response are both returning 404 File Not Found errors. Please update this article / response.

            • Hi Gergory, I apologize for the broken links. This was due to the comment being old and our KB undergoing a reorganizing several months ago. We’ve not compiled all methods of changing your password in one easy to access post at the following URL:

              http://kb.site5.com/control/how-to-change-your-password/

  • On our PCI compliance scan completed by Trustwave Portal it states that OpenSSH prior to version 4.4 is affected by multiple vulnerabilities that may allow for a remote attacker to execute arbitrary code on the affected device.

    Is OpenSSH the same as SSH? It does not come up in the search.

    • Hello Cyndy,

      The version of OpenSSH (also known as SSH) is the current version from our upstream vendors. Our vendors use a method of patching known as backporting, which packages in critical security updates into previous stable versions to ensure a mature build.

      If you have any other questions, please feel free to leave a comment here, or you can speak to our support department directly by opening a ticket though Backstage.

  • How to add access to SSH to more than one users?

    • Hello Amar,

      I hope this reply finds you well!

      Currently, there is no way to add additional SSH users to your account. This is because each SiteAdmin/cPanel account is linked to a single linux user account and it currently not possible to link multiple users to one account.

      We apologize for the inconvenience.

      If you have any questions, please feel free to leave a comment here, or if you prefer, you can contact our support team directly by opening a ticket through Backstage.

  • Hello,

    I had a service scan our websites and they came up with 11 vulnerabilities from SSH.

    Our previous provider only had 4.

    Why would this be the case?

    Thank you for your service.

  • Hello Kur,

    Most external scans will reveal these vulnerabilities because they look at the version of various software installed, and not much else. This is perfectly fine, but it does often lead to false positives.

    We are aware of the vulnerabilities in an unpatched SSH installation, and have taken steps to repair these using patches, security updates, and our own internal security tools. If you are concerned over the results, by all means submit a ticket with the listed vulnerabilities, and our team can take a closer look and provide evidence that these have been patched.

Money Back Guarantees