How to login to Linux at DCU
There are many different ways to use Linux at DCU.
- Go physically into CA labs.
- Reboot a PC.
- Choose Linux.
- The School of Computing ("CA") has its own Linux and Windows sysadmins.
- For Linux admin problems (e.g. password issues) see docs:
And can email sysadmins at:
support@computing.dcu.ie
Access from home and from Windows.
- ssh
- This is a hugely important protocol, in use globally to give you a command-line on a remote Linux/Unix system.
More below.
- sftp
- This is a hugely important protocol, in use globally to give you a read-write file system on a remote Linux/Unix system.
More below.
- Web browser access
- A more recent invention is Web browser access to do ssh (command line only)
or maybe get an entire GUI
through the Web browser.
This is set up for DCU, but may not be set up for other Linux systems you will meet elsewhere.
student.computing.dcu.ie Linux account
All the remote access routes lead to your student.computing.dcu.ie Linux account.
I have my own such account, which is
mhumphrysdculab
My account has the following properties:
Your account will be similar
(change user name and group name).
2FA
A single password is very handy, but sadly is not very secure.
Foreign hackers run bots trying to guess passwords of ssh logins on large numbers of servers.
Your password may be hard to guess,
but if there are lots of users,
some
will have simple passwords and the bots will get in.
DCU now uses a
2FA
security system.
The idea is you need something else, that a foreign hacker will not have.
For example, it is linked to your phone.
ssh keys
A simple form of "something a foreign hacker will not have"
is to use
ssh keys.
This is a key kept as a file on your computer, that must match another key on the server.
The key is
huge (like around 1600 characters)
so unlike a password cannot be guessed by the hacker's bot.
If you use ssh keys, you do not need the mobile phone 2FA, or even the password.
ssh is the normal way globally of getting command-line access to a Linux/Unix system.
(Web interfaces like termcast are not so common.)
- ssh
-
ssh student.computing.dcu.ie
- CA tech support
- ssh to DCU Linux
needs the password plus the 2FA verification code from Google Authentication app, as explained above.
- On ssh you can use command-line Text editors
like nano
- Windows ssh clients
- On Apple Mac: Terminal - ssh
Windows ssh client: PuTTY
- PuTTY (free)
- PuTTY download
- PuTTY FAQ
- Some settings you might change:
- Connection - Data - username
- Right-click bar - Change settings - Colors - Use system colors
- Change settings - Appearance - Change font
- Stop sessions timing out when idle: Connection - "Seconds between keepalives" - set value to say 30
- Window - Behaviour - Warn before close - off
- Copy-and-paste
is strange on PuTTY:
- Copy - Select text
- Paste - Right-click (or Shift-Insert)
- Right-click Paste is rather dangerous, so you can change this:
- Window - Selection - Right brings up menu
Using ssh with password and 2FA is awkward.
So if you are using ssh, set up ssh keys.
- termcast is already using ssh keys
- It keeps a persistent session, even if you close the tab.
- It holds the "public" key in
~/.ssh/authorized_keys
- Take a look at it. It is a text file.
- To set up ssh keys for your ssh client:
- Login to Linux
- Generate keypair:
cd $HOME/.ssh
ssh-keygen -t rsa
Hit enter to accept default filename.
Hit enter to skip passphrase.
-
Result is private and public key files:
- Append public key to authorized_keys:
cat id_rsa.pub >> authorized_keys
- Copy private key to your PC.
- You can then tell your ssh client to use this private key instead of a password.
You need to tell it username.
-
You will find it logs you in with no password and no 2FA.
To transfer files to/from USB key:
- /media/disk
- media icon on desktop - Unmount
PuTTY with private key
- To use private key with PuTTY client.
- Auth - Credentials - select file
- PuTTY does not like some private keys generated on Linux server.
- Solution:
Puttygen "Import key" and fix format.
sftp or similar is the normal way of getting remote read-write file system access to Linux/Unix systems.
Use ssh keys
- Set up your sftp client to use ssh keys, like above.
- You may find it impossible to sftp otherwise, given our 2FA system.
- You tell your sftp client to use the private key instead of a password.
You need to tell it username.
You will find it logs you in with no password and no 2FA.
Turn an sftp site into a drive
If (as is common) you have a Windows client and a Linux server,
you can use sftp to turn the Linux server into a
drive on Windows,
like the X: drive.