In order to use SSH, you will need —
- SSH User & Password :
- Whitelist your Connecting IP Address
Once you have confirmed the above information, you can connect via your preferred SSH client, using the following settings:
- Hostname: your server name as listed under My servers (i.e. example.magemojo.com/kb)
- Port: 22
You should immediately connect if the user/password combination are correct. If you see a message such as:
ssh_exchange_identification: Connection closed by remote host
Assuming your IP is whitelisted, you can connect with credentials like the example below:then your IP is not correctly whitelisted.
Use the above credentials (filled in with your settings) in your SSH client and connect. A successful connection will leave you at a prompt similar to below.
For more information, try:
compgen -c will list all the commands you could run.
compgen -a will list all the aliases you could run.
compgen -b will list all the built-ins you could run.
compgen -k will list all the keywords you could run.
compgen -A function will list all the functions you could run.
compgen -A function -abck will list all the above in one go.
My client keeps timing out
Now you can execute various commands, manipulate files. Most regular Linux commands will work. If you want to see everything, you can use the compgen command to see what is available in various forms.
Our sshd configuration does not specify a timeout though you may still experience session disconnects. Outside of network issues, this may be avoided by adjusting the KeepAlive setting in your SSH client. You may also want to use the screen utility, which will preserve a shell even if you disconnect, especially for very long running tasks.
If you misplaced your password, you could easily reset the password by clicking on the User tab followed by the user you wish to change the password. On the next screen, you should be able to spot where to change your password. When done, use this with your SSH client to connect.
I would like to use SSH keys, how do I do this?
Not a problem, keys can be managed via our panel, as well. First go to the System User section and select the appropriate user (or add a new one). Then near the bottom of the form click Show Advanced Options. You will see three separate boxes and an option to generate key pair.
Here you can –
- Generate a new keypair
- Import your own key
- Add authorized keys
Add or generate a key to the appropriate fields and hit Save to apply changes. Then you can connect using a key in your favorite SSH client.
If your IP is not whitelisted, you will not be able to connect to the SSH server/service at all! Double check that you have the correct IP in the whitelist for your server.