In this topic we’ll introduce you to SSH, a protocol that allows you to connect to a remote computer. To connect to remote server using ssh you need ssh client on your machine and following information.
- Server hostname – Website’s domain name or server public ip address
- Username – username that you’ll use to login into server
- Password – Password that’s associated with the above username in labs.itversity.com
If you’re not sure what to use for your hostname, username or password, check with ITVERSITY before connecting to your designated server.
Connecting using an SSH client on Mac OS or Linux
Both Linux and Mac OS have built in ssh clients which can be accessed using ssh command on the terminal. You can find the terminal from Applications menu in both linux and Mac OS. Once you open the terminal, you can type the following command to connect to Big data server.
ssh username@hostname E.g.: ssh firstname.lastname@example.org
After entering command press Enter. If this is the first time you’ve tried to connect to this computer, you’ll see a warning to the effect that the host couldn’t be authenticated. Type yes and press Enter to confirm that you’d like to continue with the connection. Then “Password:” prompt will appear, enter your password and then press enter again. Now you should see a welcome message and remoter server shell prompt with your name and server hostname which indicates that you are logged in a remote server successfully.
For Key based authentication in Linux, if the private is located in default directory you can use the previous command. If we need to use custom key then we can use the following by selecting key file path.
ssh -i id_rsa.pub demo@hostname
Connecting using an SSH client on Windows
One of the popular ssh client on Windows is PuTTY, which is free ssh client for windows and can be downloaded easily from this link. Download PuTTY
There are many other free and commercial available for windows.
Once you download and install PuTTY, if you run PuTTY’s windows looks as below.
In the window, we can enter the hostname or server ip address, and change the port number in the next field if there is change in port number and then click on “Open”. It should open terminal with prompt “Login as:” where we should enter the username and press “Enter”. A “Password:” prompt will appear, enter your password and then again press “Enter”.
Once you enter correct username and password, you should see the Welcome message from server and shell for the remote server.
For Key Based authentication connection using Putty:
In case the server is enabled with key based authentication, once you enter hostname and port, you should go to ssh in left side menu. Then click on
ssh command usage
- ssh user@host – connect to host as user
E.g.: ssh email@example.com
- ssh -p port user@host – connect to host on custom port number other than default port number 22.
E.g.: ssh -p 2222 firstname.lastname@example.org
- ssh-copy-id user@host – add your key to host for user to enable a keyed or passwordless login
E.g.: ssh-copy-id email@example.com