Dr. Mark Humphrys

School of Computing. Dublin City University.

Online coding site: Ancient Brain

Search:

Online AI coding exercises

Project ideas


  Go into CA labs

Overview - Remote access

termcast

ssh

sftp

Use your own Linux





How to login to Linux at DCU

There are many different ways to use Linux at DCU.


Go into CA labs

  1. Go physically into CA labs.
  2. Reboot a PC.
  3. Choose Linux.

  4. The School of Computing ("CA") has its own Linux and Windows sysadmins.
  5. For Linux admin problems (e.g. password issues) see docs:

    And can email sysadmins at:

     support@computing.dcu.ie 


Overview - Remote access to DCU Linux

Access from home and from Windows.
  1. ssh
    • This is a hugely important protocol, in use globally to give you a command-line on a remote Linux/Unix system. More below.

  2. 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.

  3. 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).
Apparently all students are now under:

 /users/student 
  


2FA

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 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, you do not need 2FA or password.
  

termcast - Web browser access to DCU Linux Command-line

  

Notes for later

  

How to change color on termcast

  

ssh

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

  

Notes for later

  

How to set up ssh keys

If you set up ssh keys, then you can use ssh and sftp without password or 2FA.
  1. Login to Linux
  2. Setup a .ssh directory if it does not exist
     mkdir ~/.ssh 
  3. Generate keypair using ssh-keygen
     cd ~/.ssh
     ssh-keygen 
    
    Hit enter to accept default filename.
    Hit enter to skip passphrase.

  4. Result is private and public key files:
    • id_rsa
    • id_rsa.pub

  5. Append public key to authorized_keys:
     cat id_rsa.pub >> authorized_keys 
  6. 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.

  7. Copy private key to your PC. There could be various ways of doing this.

  8. To use private key with PuTTY:

  9. 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.
  10. You will find it logs you in with no password and no 2FA.

  

USB key

One way of transferring files to/from your Linux account:

  
  

sftp

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

  

Use your own Linux

  

On Windows

  

On Mac

  

Notes for later

  

Other ways to set up Linux on a Windows machine

  


ancientbrain.com      w2mind.org      humphrysfamilytree.com

On the Internet since 1987.      New 250 G VPS server.

Note: Links on this site to user-generated content like Wikipedia are highlighted in red as possibly unreliable. My view is that such links are highly useful but flawed.