How to login to Linux at DCU
There are many different ways to use Linux at DCU.
Sysadmin help and my help
-
The School of Computing ("CA") has its own Linux and Windows sysadmins.
-
They have a guide to how to login. See below.
-
This page has my notes, but you may not need them.
- Also the sysadmins run the Linux server, and they make changes,
and may not immediately tell me the changes.
- So if there is any difference between my notes and theirs, go with theirs. (And tell me the updates.)
- Talk to the CA sysadmins for all password issues, not me.
- You can email them at:
support@computing.dcu.ie
Sysadmins pages
The simplest way of getting onto CA Linux.
- Go physically into CA labs.
- Reboot a PC.
- Choose Linux.
- You will have a full GUI.
- You can use
GUI editors
like gedit.
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:
/users/student/USERID
/users/student/USERID/bin
/users/student/USERID/public_html
https://student.computing.dcu.ie/~USERID
MFA
A single password is very handy, but sadly is not very secure.
Globally, 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 uses a
2FA or MFA
security system for many things.
The idea is you need something else, that a 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 to login to Linux, you
do not need MFA or 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.)
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
- CA student server requires ssh with ssh keys, not with password.
- When you set up ssh keys,
you can use ssh and sftp without
password or MFA.
- How to login to student server (CA help)
My notes on ssh keys
(May not be needed. See CA notes above.)
- Login to Linux
- Setup a .ssh directory if it does not exist
mkdir ~/.ssh
- Generate keypair using
ssh-keygen
cd ~/.ssh
ssh-keygen
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
- Hide authorized_keys:
chmod go-rwx ~/.ssh
chmod go-rwx ~/.ssh/authorized_keys
This is important. Clients may generate cryptic errors if authorized_keys is not hidden.
- Copy private key to your PC.
There could be various ways of doing this.
- To use private key with PuTTY:
- Now you have a private key on your PC,
you tell your ssh and sftp clients 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 MFA.
One way of transferring files to/from your Linux account:
- Insert USB key.
- It appears under: /media/disk
- media icon on desktop - Unmount
sftp or similar is the normal way of getting remote read-write file system access to Linux/Unix systems.
Notes for later
How to 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.
sftp likes a silent shell