`
If you use windows, the following programs are useful to connect Ragnar. The key parts are puTTy and WinSCP, you need download them and setup connection to our Ragnar server. Others are not necessary.
- puTTy: This program connects your computer via the SSH network protocol to access a terminal just like you would on one of the lab computers.
- WinSCP: This easy-to-use program allows you to transfer files between your computer and Ragnar.
- Xming: This program allows to see the GUI version of the different software we have installed on Ragnar.
- Notepad++
- Firefox
- 7-Zip Portable
To setup your connection in puTTy and WinSCP, use ragnar.econ.illinois.edu with port number 22.
RSA Keys
If you work frequently with Ragnar, entering your password at each login can be avoided with the help of an RSA key. The idea is to generate two key files, a private key for your computer and a public key for Ragnar; these files are then compared automatically when you use SSH. Moreover, SSH keys provide a more secure way of logging into a virtual private server with SSH than using a password alone.
To set your RSA key in windows follow this steps:
- Start the PuTTYgen utility (If needed, download PuTTYgen from the PuTTY download page), by double-clicking on its .exe file;
- In the Type of key to generate field, select SSH-2 RSA;
- In the Number of bits in a generated key field, specify 4096 (higher bits makes it harder to crack the key by brute-force methods);
- Click the Generate button;
- Type a Key comment field. This is neither your password for your computer, nor your password for Ragnar. It should have 10 to 30 characters;
- Click the Save public key button & choose whatever file name you’d like (some users create a folder in their computer named my_keys);
- Click the Save private key button & choose whatever file name you’d like (you can save it in the same location as the public key, but it should be a location that only you can access and that you will NOT lose! If you lose your keys and have disabled username/password logins, you will no longer be able log in!);
- Right-click in the text field labeled Public key for pasting into OpenSSH authorized_keys file and choose Select All;
- Right-click again in the same text field and choose Copy.
NOTE: PuTTY
and OpenSSH
use different formats for public SSH keys. If the SSH Key you copied starts with “—- BEGIN SSH2 PUBLIC KEY …”, it is in the wrong format. Be sure to follow the instructions carefully. Your key should start with “ssh-rsa AAAA ….”
Save The Public Key On Ragnar
Now, you need to paste the copied public key in the file ~/.ssh/authorized_keys on your server.
Log in Ragnar. If your SSH folder does not yet exist, create it manually:
mkdir ~/.ssh
chmod 700 ~/.ssh
touch ~/.ssh/authorized_keys
Paste the SSH public key into your ~/.ssh/authorized_keys
file
vim ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_key
Update the Ragnar PuTTY Profile to Save Your Server’s Settings In PuTTY
- Select
SSH
under Protocol
;
- Along the left-hand side of the window, select the Data sub-category, under Connection;
- If needed specify the username that should be your netid;
- Expand the SSH sub-category, under Connection;
- Highlight the Auth sub-category and click the
Browse
button, on the right-hand side of the PuTTY window;
- Browse your file system and select your previously-created private key;
- Return to the Session Category and Click the
Save
button
- However, if you had set a pass phrase on your public key, you will be asked to enter the pass phrase at that time (and every time you log in, in the future).