Skip to content

Server access

Leonardo Gama edited this page Oct 2, 2024 · 11 revisions

Leia este artigo em português: Acesso aos servidores

This article only provides basic instructions for new users to access the group's computing resources for the first time. For details about installing, configuring and using SSH, see the article Shell Segura (SSH) (in Portuguese).

Contents

The AMPhyBio Laboratoy currently has two dedicated servers, called eve and antp, which are physically located at EACH-USP and are accessible via the Internet through their shared public IP address: 143.107.58.80. They may be used for remote work or to carry out computationally intensive tasks.

The main access method is via a terminal connection with a Secure Shell (SSH). Graphical applications can be run over SSH using X forwarding. Other ways of accessing server resources (example: RStudio Server or JupyterLab web interfaces) may be set up in the future according to need.

Account creation

  1. Ask any sysadmin team member to create a user account for you. Required information:
    • the desired username
    • name and surname
    • e-mail address (@usp.br if you have it)
  2. If the account is created with a random password, log in for the first time (on both servers) and change your password with the command:
$ passwd

Obs.: at the moment, the password is used only to execute commands with sudo for users with special permissions.

SSH access

The most recent versions of all major operating systems come with the OpenSSH client pre-installed by default —including Windows, in which it just needs to be enabled. There are many alternatives of SSH clients for Windows, like the desktop application MobaXterm. The following instructions refer to the use of the command-line client.

For connecting to any of the servers, you'll need to create and register your cryptographic credentials. The SSH server in both eve and antp is set up to authenticate users by using public-private cryptographic key pairs.

Generating your key pair

  1. Open a terminal or command prompt (Windows);
  2. Run the following command:
    $ ssh-keygen -b 4096
    
  3. You'll be prompted to insert a name for the files that will hold the created keys and the folder where they will be stored —press Enter to accept the default location. The private key file has no name extension, while the public key one will receive a .pub extension;
  4. Then, choose a strong password to protect your private key;
  5. If everything went right, a fingerprint of the generated public key will be displayed.

¹ The private key file has no name extension, while the public key will receive the .pub extension.

Registering your first public key in the servers

Send the file holding your public key (default location: /home/username/.ssh/id_rsa.pub) or copy its contents in an e-mail to a sysadmin asking for it to be registered. After the first key is configured, you'll be able to register extra keys by yourself.

Accessing the servers

The eve server is accessed by the public IP address 143.107.58.80 using the standard SSH port (the TCP port of numbersimply 22). The antp server is accessed indirectly through the eve server as "proxy" and using the local IP address 172.16.10.7.

Complete commands

To connect to eve, open a terminal window and use the ssh command with your server's username and the IP address as follows:

You'll be prompted for your private key's password. If the connection is successful, you'll see a text banner with the server's information. You're now online!

To connect to antp, use the ProxyJump feature (with option -J) through the eve server:

Simplified commands with SSH configuration file

If the SSH client has the correct settings in the file ~/.ssh/congig, the commands for connecting to the servers will become just "ssh eve" and "ssh antp".


See also

If you want to learn more about the ssh command, this tutorial may be helpful: https://www.ssh.com/academy/ssh/command.