If you are using a Unix-like system, skip to the enumerated steps below.
If you are using Windows 10, you will need a client which allows you to generate a RSA key pair. Open Settings → Apps → Optional features and click on Add a feature next to the plus sign. Scroll through the list to find and select OpenSSH Client. Finally, click Install.
On Unix, start your terminal.
On Windows 10, open cmd as administrator: Click on the start button, search ``cmd'', right click on ``Command Prompt'' and select ``Run as administrator''.
On Unix, execute (type and hit the return key) the code ssh-keygen -t rsa in the terminal. On Windows 10, execute the code ssh-keygen in the command prompt.
The following (or something similar tot he following) will be displayed:
Generating public/private rsa key pair.
Enter file in which to save the key (~/.ssh/id_rsa):
Hit the return key to keep the location as it is.
In the next step, you'll be asked for a passphrase. Enter a passphrase and hit the return key. Note: Whle you are typing the passphrase, no character will be displayed, they will simply be input one by one; so type carefully. If required, hit the backspace multiple times to clear out the passphrase and re-enter.
This passphrase will be required whenever you are trying to connect with the remote server through the ssh protocol. While connecting, the remote server will try to authenticate using your identity (the identity on your local computer). Even if someone else tries to connect to your CMI account through your computer, they will be unsuccessful because you'll be the only one knowing this passphrase.
You may skip this step (which is not recommend) by simply hitting return, in which case the passphrase will not be required for establishing a connection.
Congratulations! You have successfully generated an RSA key pair...if everything has gone right. The path to you your private key public key will be displayed, along with the key fingerprint and a random image. Here is a sample display in Unix terminal (something similar will be shown in Windows 10):
Your identification has been saved in ~/.ssh/id_rsa.
Your public key has been saved in ~/.ssh/id_rsa.pub.
The key fingerprint is:
The key's randomart image is:
+--[ RSA 2048]----+
| o=. |
| o o++E |
| + . Ooo. |
| + O B.. |
| = *S. |
| o |
Never ever share the id_rsa file with anyone. This is your (computer's) private identity.
Open your file browser and navigate to the location where your key-pair are saved. By default, the path is ~/.ssh/ on Unix, or C:\Users\<username>\.ssh\ on Windows. You will be needing the id_rsa.pub file (NOTid_rsa).
If you cannot navigate to the above location, open your terminal (cmd on Windows) and execute the following commands. I shall assume that the location of the key-pair is the default one.
For Unix: cp ~/.ssh/id_rsa.pub ~/Desktop
For Windows: copy C:\Users\<username>\.ssh\id_rsa.pub C:\Users\<username>\Desktop
This will copy your public key (the component of the pair which is public) to your desktop.
Now log in to your CMI account. Compose an email to the system administrator asking them to ``kindly copy the ssh key to the appropriate location". Attach the file id_rsa.pub in this email. Send it.
Open your terminal (or cmd on Windows) and try to execute ssh <cmi_userid>@access2.cmi.ac.in. For example, I would execute ssh firstname.lastname@example.org on the terminal. You will be asked to enter your passphrase. After you enter this correctly, you will be connected to your CMI local account.
You can now access the local computer at CMI loggined with your account, as it would have looked like when accessing offline from the computer lab, remotely from your home. The only difference is that the GUI will be missing. You may (recommended) learn to work with the linux terminal from some online resources. Here is a good place to start.
The CMI inbox (Roundcube) has a very limited capacity, and tends to get full too soon. One way is to continuous delete emails or save them in some place other than your inbox. There's another way out. You might want to forward those mails, which come to your CMI account, to some other account (like gmail) which has a considerable amount of inbox capacity. Follow the steps below. I am assuming that you do not have access to the CMI computers. Keep your terminal ready.
ssh to your cmi account. For example, I'd execute ssh email@example.com.
Now you need to create a file named .forward which contains just the email to which you want your CMI mails to be be forwarded (firstname.lastname@example.org in my case). To do this, execute the command echo <your_complete_email> > ~/.forward. For example, I'd execute echo email@example.com > ~/.forward.
Congratulations! From now, any email sent to your CMI account will be redirected to the other account you provided in the file.
For sending emails from your CMI account, you still have to login to Roundcube. If you want to avoid this as well, follow the steps below. I shall assume here that you are using gmail. For other email service providers, I'm sure there must be something analogous.
Go to Settings → Accounts and Import. Scroll down and locate Send mail as:.
Click on Add another email address.
You will be asked for your name and the email address that you want to add. In my case, I'd enter Nilava Metya and firstname.lastname@example.org respectively. If the gmail account is yours (and so is the CMI account), keep the Treat as an alias option checked. Click on the button.
You may use the following settings:
SMTP Server: mail.cmi.ac.in
Username: <your_cmi_userid>@cmi.ac.in (I would fill in email@example.com)
Password: your_password (I would fill in … yes, you know my password)
Secured connection using TLS
Click on Save Changes.
Now when you compose an email from your gmail account, you should see a dropdown option in the From: field, where both your gmail and cmi accounts will be mentioned.
You might want to add a filter on gmail to separate emails related to your CMI account. This helps in better management. Learn more about this here.