SSH Access
Connecting via ssh to Global Shellz is easy. See below for instructions.
Contents |
Advanced
- us.gshellz.org operates ssh on port 222
- eu.gshellz.org operates ssh on port 222
Walk-Through
In windows you have multiple options for access, we recommend Putty for the new user and Cygwin for anyone who wants more then just ssh (scp, rsync, etc).
Windows
Putty
- Once you have downloaded Putty and installed it, we need to setup our Global Shellz connection. First we start by adding in the hostname us.gshellz.org (or eu.gshellz.org) and update the port to 222 (or 666) as seen in the picture below. Also make sure to label your session for future reference like so:
- Next we click on Connection -> Data and under 'Auto-Login username' type in your Global Shellz username, as seen below underlined in red:
- Under Connection -> SSH -> Auth at the bottom, you will see Private key file for authentication:. If you have generated an SSH key pair, then you would add your 'private' key here for passwordless login. (If you would like to know how to create an SSH key see our HOWTO) This is not necessary, but helps if you connect frequently.:
- Finally we come back to Session and click on the 'Save' button to the right to save our configuration, like below:
- Since this would most likely be your first time connecting to the server, you maybe be prompted with warning message, similar to the one below, from either Global Shellz host. Just accept that, as it is an FYI message. From there you will be prompted to put in your password (or if you have your ssh keys setup, you'll be greeted by your prompt).
Linux
Standard Connection
[user@host ~]# ssh -p222 myusername@us.gshellz.org
OR
[user@host ~]# ssh -p222 myusername@eu.gshellz.org
SSH Config
To make access easier you can create/edit your LOCAL ~/.ssh/config file.
Create and/or open the file with your choice of editor, and add ( words surrounded in ""'s are replaced with what the person requires )
Host "nx01" HostName us.gshellz.org Port 222 user "shellusername"
or
Host "tetris" HostName eu.gshellz.org Port 222 user "shellusername"
This now makes it possible to use,
[user@host ~]# ssh nx01 or [user@host ~]# ssh tetris
Mobile OSes
- J2ME - MidpSSH is available for these devices, supporting most devices in existence today.
- Symbian - A port of PuTTY has been made, running on all versions of Symbian. It also includes support for logging in via SSH keys, although it can only use those created through PuTTYgen. (If you're on Linux, PuTTYgen runs fine under Wine). The underlying engine supports other features not visible in the UI, such as Port Forwarding. The simplest way to use these is to import the config file from PuTTY for Windows.
- Android - Derived from Linux, Android has a number of packages providing SSH Connectivity, such as ConnectBot.
Passwordless Login
Generating a key pair
From your computer's command line, type ssh-keygen -t rsa to create a public/private key pair:
[user@localhost:~>] ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/user/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/user/.ssh/id_rsa. Your public key has been saved in /home/user/.ssh/id_rsa.pub. The key fingerprint is: XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX user@localhost
If you leave the passphrase empty, anyone with the private key stored on their computer will be able to connect to your account. If you select a passphrase, you'll need to have the private key on your computer and know the passphrase associated with it.
The private key is saved as ~/.ssh/id_rsa. This file is read-only and just for you. No one else must know the content of this file, as it is used to decrypt all correspondence encrypted with the public key.
The public key is saved as ~/.ssh/id_rsa.pub.
Windows users can use PuTTYgen, which is provided on the PuTTY package, to create keys.
Copying your public key to your shell account
Now you need to copy your public key to your shell account.
On most *nix systems, you can run:
ssh-copy-id '-p 222 thewookie@us.gshellz.org'
Else you should try to copy/paste the contents of your local ~/.ssh/id_rsa.pub into the servers ~/.ssh/authorized_keys.
As alternative, you can run the following line. It is not recommended as it will remove any previous contents of the file ~/.ssh/authorized_keys on the server, so if you have other keys in that file already, DO NOT do this!
[user@localhost:~>] scp ~/.ssh/id_rsa.pub thewookie:~/.ssh/authorized_keys
Windows users can use WinSCP to upload the keys
Now, connecting from your computer to GSH should no longer require a password (unless you use a passphrase) as it uses RSA encryption and authentication to log you in. If you entered a passphrase when you created the SSH keypair files, you will need to enter it the first time you connect after starting up your system but after that it will be remembered, provided that you are using ssh-agent (which many Linux distros, including Ubuntu, starts by default.)
Under Windows, Pageant, included in the PuTTY package, provides the same features as ssh-agent under Linux.