Linux Questions

From CS Support
Jump to: navigation, search

NOTE: Parts of this document are borrowed heavily from the excellent documentation found in the Beocat wiki. Please have a look there for more details and in-depth examples.

How do I connect to Linux systems?

To login remotely to CS Linux systems, you first need an "SSH Client". SSH, short for "secure shell", is a protocol that allows secure communication between two computers. We recommend the following.

  • Windows
    • PuTTY is by far the most common SSH client, both for CS and in the world.
    • MobaXterm is a fairly new client with some nice features, such as being able to SCP/SFTP (see below), and running X (Linux graphical desktop).
    • Cygwin is for those that would rather be running Linux but are stuck on Windows. It's purely a text interface.
  • Macintosh
    • OS-X has SSH a built-in application called "Terminal". It's not great, but it will work for most CS users.
    • iTerm2 is the terminal application we prefer.
  • Others
    • There are many SSH clients for many different platforms available. While we don't have experience with many of these, any should be sufficient for access to CS Linux systems.

You'll need to connect your client (via the SSH protocol, if your client allows multiple protocols) to cslinux.cs.ksu.edu.

For command-line tools, the command to connect is

ssh username@cslinux.cs.ksu.edu

Your username is your CS login (usually the same as your K-State eID) and the password is your CS password (which is only the same as your eID password if you set it manually or using our password reset page).

Note: When you type your password, nothing shows up on the screen, not even asterisks.

The first time you log into a new host, you will be asked to confirm adding the SSL signature to your local repository. Just say "yes" in whatever appropriate form when asked.

You'll know you are successfully logged in when you see a prompt that says

username@hostname:~$

where hostname is the name of the machine you've logged into (currently either 'cougar' or 'viper') and username is your eID username

How do I transfer files to/from Linux systems?

Usually, one of the first things people want to do is to transfer files into or out of their CS account. To do so, you need to use SCP (secure copy) or SFTP (SSH FTP or Secure FTP). Again, there are multiple programs that do this.

  • Windows
    • Putty (see above) has PSCP and PSFTP programs (both are included if you run the installer). It is a command-line interface (CLI) rather than a graphical user interface (GUI).
    • MobaXterm (see above) has a built-in GUI SFTP client that automatically changes the directories as you change them in your SSH session.
    • FileZilla (client) has an easy-to-use GUI. Be sure to use 'SFTP' mode rather than 'FTP' mode.
    • WinSCP is another easy-to-use GUI.
    • Cygwin (see above) has CLI scp and sftp programs.
  • Macintosh
    • FileZilla is also available for OS-X.
    • Within terminal or iTerm, you can use the 'scp' or 'sftp' programs.
  • Linux
    • FileZilla also has a GUI linux version, in additon to the CLI tools.

Using a Command-Line Interface (CLI)

You can safely ignore this section if you're using a graphical interface (GUI).

Example

Transfer a file called myfile.txt in your current folder to your home directory on CSLinux.

I am using my username ("sgsax") here. You should replace this with your own when you run these commands.

Using SCP:

scp myfile.txt sgsax@cslinux.cs.ksu.edu:
Password: (type your password here, it will not show any response on the screen)
myfile.txt                                                                            100%    0     0.0KB/s   00:00

Note the colon at the end of the 'scp' line.

Using SFTP:

sftp sgsax@cslinux.cs.ksu.edu
Password: (type your password here, it will not show any response on the screen)
Connected to cslinux.cs.ksu.edu.
sftp> put myfile.txt
Uploading myfile.txt to /home/s/sgsax/myfile.txt
myfile.txt                                                                            100%    0     0.0KB/s   00:00
sftp> exit

SFTP is interactive, so this is a two-step process. First, you connect to CSLinux, then you transfer the file. As long as the system gives the sftp> prompt, you are in the sftp program, and you will remain there until you type 'exit'.

For more examples of advanced usage, please visit the Beocat wiki.

How do I use Linux?

Please read our Linux Primer

Why can't I login to the Linux lab?

Problem: When you try to login to a Linux lab desktop, the screen goes black and then reverts immediately to the login screen. No errors are displayed.

Cause: This is due to corruption or incompatibility of one of your X.org configuration files. The solution is to remove this file.

Resolution:

  1. Press <Ctrl>-<Alt>-<F1> to switch to a local virtual console and login using your regular credentials.
  2. At the prompt (ending with a $ character), type the following and press <Enter>
    rm .Xauthority
  3. Logout using either logout or exit
  4. Switch back the the GUI login screen by pressing <Ctrl>-<Alt>-<F7>

You should now be able to login as usual.

How do I get on KSU Wireless from my Linux laptop?

The official documentation from ITS for doing this is incorrect. The following settings should work for Ubuntu users, but other distros should be similar. Open your wireless connection settings and make these changes for the KSU Wireless network:

  • Security: WPA & WPA2 Enterprise
  • Authentication: Protected EAP (PEAP)
  • CA certificate: AddTrust_External_Root.pem (may need to manually locate this in /etc/ssl/certs)
  • PEAP version: Automatic
  • Inner authentication: MSCHAPv2
  • Username: <your eID>
  • Password: <your eID password> (or leave blank to be prompted)