Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
student:stu:basics [2020/02/04 12:37] – [Transferring Files to and From stu] lam2mostudent:stu:basics [2023/02/19 12:08] (current) – [Accessing Lab Computers] morrispj
Line 1: Line 1:
- 
- 
 ===== Help with stu.cs.jmu.edu ===== ===== Help with stu.cs.jmu.edu =====
- 
- 
 "stu" is a server running Linux that is available to all students in the JMU "stu" is a server running Linux that is available to all students in the JMU
 Computer Science Department. Computer Science Department.
  
 +==== Logging in to stu ====
 +You can login to "stu" using an SSH client (and the host name   ''%%stu.cs.jmu.edu%%''). All modern operating systems should come with command-line SSH client (usually named ''%%ssh%%''). Windows 10 users may need to install the client [[https://www.howtogeek.com/336775/how-to-enable-and-use-windows-10s-built-in-ssh-commands/|manually]], depending on version and edition. GUI SSH clients are also available, but add little.
  
 +To log in, type the following in a terminal/cmd window, replacing <eid> with your JMU username.
  
-==== Logging in to stu ====+    ssh <eid>@stu.cs.jmu.edu
  
-You can login to "stu" using an SSH client (and the host name   ''%%stu.cs.jmu.edu%%''). All modern operating systems should come   with command-line SSH client (usually named ''%%ssh%%''). GUI SSH   clients are also available, but add little.+Enter your password when prompted. Nothing will appear on the screen so type carefully!
  
 +=== Keypairs ===
 You can avoid the need to authenticate yourself (with your eID and password) each time you login [[ student:utilities:start:keypairs | using a public/private key pair]]. This is particularly useful when using another protocol (e.g., Subversion or Git) on top of SSH. You can avoid the need to authenticate yourself (with your eID and password) each time you login [[ student:utilities:start:keypairs | using a public/private key pair]]. This is particularly useful when using another protocol (e.g., Subversion or Git) on top of SSH.
  
-To log into a specific lab computer you first login to stu as normal and then you use "ssh L[room_number][computer_number]" (fill in the information in the brackets without the brackets).+==== Accessing Lab Computers==== 
 +To log into a specific lab computer you first login to stu as normal and then ssh to a lab machine by hostname. The hostnames are based on the room and computer number and take the form "L[room_number][computer_number].cs.jmu.edu".
  
 +^ Room         ^ Hostname Range          ^
 +| ISAT/CS 248 | L248{01..32}.cs.jmu.edu |
 +| ISAT/CS 250 | L250{01..31}.cs.jmu.edu |
 +| ENGEO 2204 | L2204{01..32}.cs.jmu.edu  |
 +
 +This can be simplified by using the ''-J'' option to ssh. For example, the following command would jump through stu to reach a lab computer in ISAT/CS 250.
 +
 +    ssh -J <eid>@stu.cs.jmu.edu <eid>@l25005.cs.jmu.edu
 +
 +You can do this transparently by adding the following to your ~/.ssh/config:
 +
 +    Match !host stu.cs.jmu.edu host *.cs.jmu.edu !exec "nc -z -w 1 %h %p"
 +        ProxyJump stu.cs.jmu.edu
 +
 +This uses netcat to determine if you can connect directly to the host and if not, for all .cs.jmu.edu hosts other than stu, jump through stu. Connecting to a lab machine with this configuration is the same from on or off campus: ''ssh l25005.cs.jmu.edu''.
 +
 +Setting up keypairs is highly recommended if you're doing this regularly to avoid multiple password prompts.
  
 ==== Transferring Files to and From stu ==== ==== Transferring Files to and From stu ====
 +You can transfer files to "stu" using an SCP client (and the host name  ''%%stu.cs.jmu.edu%%''). Modern operating systems include a command-line scp client named ''scp''. See [[http://www.hypexr.org/linux_scp_help.php|this article]] for some usage examples. There are also GUI clients available that work like a file explorer. Options include [[ https://filezilla-project.org/| FileZilla]], [[https://winscp.net/eng/index.php|WinSCP]] and [[https://cyberduck.io/|Cyberduck]]. Both SCP and SFTP use port 22 (see more detailed instructions on [[student:stu:filezilla|Transferring Files from Your JMU CS Account with FileZilla]].
 +
  
-You can transfer files to "stu" using an SCP client (and the host name   ''%%stu.cs.jmu.edu%%'')+If you want a more seamless experience or the ability to edit files on "stu" using a local editor like Eclipse or VS Code, you can [[student:utilities:sshfs|mount your home folder locally]]
  
-If you want a more seamless experience or the ability to edit files on "stu" using a local editor like Eclipse or VS Code, you can [[student:utilities:sshfs|mounting your home folder locally]]. The department strongly discourages the use of editor-specific plugins such as "Visual Studio Code Remote" for performance and security reasons, and students found using these extensions may be asked to stop. 
 ==== Using stu as an HTTP Server ==== ==== Using stu as an HTTP Server ====