Yes, it is possible to SSH to Shared Hosting Server with non-sudoers’ privilege, it never gives the full usage, still better than FTP ! Shared Server is good choice for parking the domains – in case you have 50+ domains. OpenShift to Rackspace – none actually are suitable for this purpose. We must not abuse the free usage tier offered by Rackspace (dev), Digital Ocean, Amazon, OpenShift or Heroku. Paying few dollars to Hostgator like Shared Hosting can solve the situation to host 100s of not so active websites. author has not much experience about Shared Servers but Hostgator, SlowDaddy GoDaddy etcetera web hosts allows to SSH. That is what we are going to discuss on this topic – How to SSH to Shared Hosting Server.
How to SSH to Shared Hosting Server : Basics
At least Hostgator allows to SSH up to $HOME
folder, here is the copy paste from CLI :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | ? ~ ssh -p 2222 tcwmedia@140.258.189.20 The authenticity of host '[140.258.189.20]:2222 ([192.254.189.28]:2222)' can't be established. RSA key fingerprint is bb:6a:51:b4:63:e8:3b:a1:c9:c8:29:3f:b9:1b:4e:49. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '[140.258.189.20]:2222' (RSA) to the list of known hosts. tcwmedia@192.254.189.28's password: Attempting to create directory /home3/tcwmedia/perl5 tcwmedia@freehealthfoundation.org [~]# pwd /home3/tcwmedia tcwmedia@freehealthfoundation.org [~]# cd .. tcwmedia@freehealthfoundation.org [/home3]# cd .. tcwmedia@freehealthfoundation.org [/]# ls /bin/ls: cannot open directory .: Permission denied tcwmedia@freehealthfoundation.org [/]# pwd / tcwmedia@freehealthfoundation.org [/]# cd $HOME tcwmedia@freehealthfoundation.org [~]# ls ./ .contactemail .gemrc .trash/ public_ftp/ ../ .cpanel/ .htpasswds/ access-logs@ public_html/ .bash_logout .dns .kshrc etc/ tmp/ .bash_profile .emacs .lastlogin mail/ www@ .bashrc .ftpquota .pki/ perl5/ tcwmedia@freehealthfoundation.org [~]# sudo usage: sudo [-D level] -h | -K | -k | -V usage: sudo -v [-AknS] [-D level] [-g groupname|#gid] [-p prompt] [-u user name|#uid] usage: sudo -l[l] [-AknS] [-D level] [-g groupname|#gid] [-p prompt] [-U user name] [-u user name|#uid] [-g groupname|#gid] [command] usage: sudo [-AbEHknPS] [-r role] [-t type] [-C fd] [-D level] [-g groupname|#gid] [-p prompt] [-u user name|#uid] [-g groupname|#gid] [VAR=value] [-i|-s] [<command>] usage: sudo -e [-AknS] [-r role] [-t type] [-C fd] [-D level] [-g groupname|#gid] [-p prompt] [-u user name|#uid] file ... tcwmedia@freehealthfoundation.org [~]# sudo su sudo: unable to mkdir /var/db/sudo/tcwmedia: Read-only file system We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things: #1) Respect the privacy of others. #2) Think before you type. #3) With great power comes great responsibility. [sudo] password for tcwmedia: tcwmedia is not in the sudoers file. This incident will be reported. tcwmedia@freehealthfoundation.org [~]# |
So, you can not run sudo command! I laughed a huge at “We trust you have received the usual lecture from the local System Administrator”. Obviously, you are doing SSH on a Shared Server and running sudo…
---
Port is specific for the web host – like here its 2222. To SSH you need to run :
1 | ssh -p 2222 your-user-name@your-ip-address |
Why to SSH to Shared Hosting Server
You run curl, wget, cd, mv, rm etcetera common commands which never needs sudo privilege. It depends on the server admin whether you can run tar, zip or other commands.
Tagged With ftp shared server , how to ssh to godaddy shared server , shared hosting ftp vs ssh , ssh on shared host , ssh shared server , ssh sudo prevlage access shared hosting