techsupport:guides:ssh
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
techsupport:guides:ssh [2022/10/12 16:32] – [SSH Keys One Time Setup] jlange | techsupport:guides:ssh [2023/09/07 15:35] (current) – kjohns23 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== SoCS SSH Access ===== | + | ====== SoCS SSH Access |
+ | ===== What is SSH ===== | ||
- | ==== The Basics ==== | + | SSH is a program that allows you to log in to and run programs on a remote server. It is used in the School of Computer Science to allow access to our Linux Servers from your own computer, where you can edit, compile, and run code for your labs and assignments. SSH comes in two part - the client and the server. |
- | SSH is a program | + | **The SSH Server:** The ssh server |
- | ==== Accessing your SSH Client | + | **The SSH Client:** The SSH client runs on your own machine and allows you to connect to the server. |
- | To use SSH to connect to SoCS Servers, you will first need an SSH client. SSH is available | + | ===== Required Software ===== |
+ | |||
+ | To use SSH to connect to SoCS Servers, you must have an SSH Client installed. SSH is available | ||
+ | |||
+ | ==== Check if an SSH Client is Installed ==== | ||
=== Windows === | === Windows === | ||
- | A built in client is now available on Windows. You can access it by opening Windows Powershell. | + | A built in client is available on Windows, and can be accessed |
To check if ssh is installed, Open Windows Powershell, and type " | To check if ssh is installed, Open Windows Powershell, and type " | ||
- | {{: | + | {{: |
- | This client should be available by default, but if it is missing, follow the instructions in the Install SSH on Windows section | + | This client should be available by default, but if it is missing, follow the instructions in the [[ssh#Install SSH on Windows|Install SSH on Windows]] |
=== Mac OS === | === Mac OS === | ||
- | The SSH client comes automatically installed as part of Mac OS. To access the ssh client, open the Terminal application. | + | The SSH client comes automatically installed as part of Mac OS. To access the ssh client, open the Terminal application, then type " |
+ | |||
+ | {{: | ||
=== Linux === | === Linux === | ||
- | The OpenSSH Client | + | The SSH client |
- | ==== SSH from Off-Campus | + | ===== Connecting to the SSH Server ===== |
- | As of October 2022, using an ssh key is required to access SoCS Linux servers from off campus. | + | |
==== Connecting to a Server ==== | ==== Connecting to a Server ==== | ||
Line 40: | Line 46: | ||
From Mac OS or Linux:\\ {{: | From Mac OS or Linux:\\ {{: | ||
- | ==== Common Problems and Errors==== | + | ==== SSH from Off-Campus |
- | === Time Out === | + | SSH connections from off campus are restricted by the campus firewall. |
- | == Problem == | + | |
- | After entering | + | |
- | == Solution == | + | - **Preferred** SSH Connections |
- | If you are connecting from off campus, the most likely issue is that the CCS VPN is not running. Ensure that the VPN is enabled and try connecting again. If the VPN is running, | + | - Use SSH key based authentication to connect to Portkey from off campus, |
- | === Permission Denied === | ||
- | == Problem == | ||
- | Every time you enter your password, you receive the following error: < | ||
- | == Solution == | ||
- | The most likely cause is that you are not specifying your username when trying to connect. If you type '' | ||
+ | ===== Install the SSH Client ===== | ||
==== Install SSH on Windows ==== | ==== Install SSH on Windows ==== | ||
Line 64: | Line 64: | ||
* You can now open Windows Powershell and use SSH | * You can now open Windows Powershell and use SSH | ||
- | ==== SSH Keys One Time Setup ==== | + | ==== Install |
- | SSH Keys are an advanced feature that allow you to use a key to connect instead of using your password. This has the benefit of being both more secure, and more convenient to use. As of October 2022, SSH keys are required to access the SoCS servers from Off Campus. Regular password based login is still allowed from on campus. Please note that SSH may not be enabled on your Windows machine by default. Follow the topic in this article on how to install SSH before continuing with this guide. | + | === APT === |
- | To set up public key private key access to linux: | + | * '' |
- | === Part A For all platforms | + | === YUM === |
- | - Have a passphrase (password) handy that you can remember. | + | |
- | - Open a terminal window (or PowerShell for Windows) | + | |
- | - Type ssh-keygen -t ed25519 -C yourusername@linux.socs.uoguelph.ca | + | |
- | - Press return to accept the default file locations for storing keys | + | |
- | - Enter your passphrase when prompted (make sure you can remember it) | + | |
- | - Enter the SAME passphrase again | + | |
- | - In the same terminal window, | + | |
- | - Type "more id_rsa.pub" | + | |
- | - Copy the long string of text that begins with ssh-rsa and ends with yourusername@linux.socs.uoguelph.ca. | + | |
- | - Keep that text in the clipboard for the next step and go to Part B (either for on campus or off campus, depending on your location). | + | |
- | === Part B For all platforms (ON CAMPUS ONLY) === | + | * '' |
- | - ssh to linux.scos.uoguelph.ca using your Central Login ID and password (use PowerShell on windows if you don't have a different client. On OS/X and linux just use a terminal) | ||
- | - Type "cd ~/ | ||
- | * If you get an error ".ssh No such file or directory", | ||
- | - Use your favourite command line editor (vim, nano, emacs, etc.) to edit the authorized_keys file | ||
- | * i.e. type 'nano authorized_keys' | ||
- | * Unless you've done this step once already, you will be creating this file. it MUST be called authorized_keys | ||
- | - Paste in the long string of text that you copied to your clipboard in step A | ||
- | - Save the file. | ||
- | - Log out of the server. | ||
- | === Part B For all platforms (OFF CAMPUS ONLY) === | + | ==== Common Problems and Errors==== |
- | - Connect to NoMachine to facilitate the file transfer process. If you have not used NoMachine before, please reference our [[techsupport: | + | === Time Out === |
- | - If you are unable to bring your private key to campus (via a laptop, removable storage device, etc.) and cannot transfer files via NoMachine, you must send your public key to [[help@socs.uoguelph.ca]]. Your public key will then be put into your home folder. This process may take up to a day to complete, so it is recommended to only use this option as a last resort. | + | == Problem == |
- | - Once the key has been added to the server, attempt to ssh from off campus using //ssh central-ID@socs.uoguelph.ca//, | + | After entering |
- | * If ssh is not able to find your private keys file, you can include | + | |
- | === Part C For all platforms === | + | == Solution |
- | - Open terminal window, or Powershell (Windows only) | + | If you are connecting from off campus, the most likely issue is that you are trying |
- | - ssh to portkey.socs.uoguelph.ca | + | |
- | - You SHOULD be prompted for the passphrase you used in Part A, and then you should | + | |
- | - This login method works for secure FTP programs too, such as filezilla, which will allow you to ftp files directly to your linux account. | + | |
- | Once you have your ssh keys set up you will be able to use them to log in to any SoCS Linux server. | + | === Permission Denied === |
+ | == Problem == | ||
+ | Every time you enter your password, | ||
+ | |||
+ | == Solution == | ||
+ | The most likely cause is that you are not specifying your username when trying |
techsupport/guides/ssh.1665592375.txt.gz · Last modified: 2022/10/12 16:32 by jlange