> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gpuhub.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SSH

> SSH (Secure Shell) Remote Connection

<Note>
  Windows Users: You can log in using the built-in PowerShell/CMD. For a better terminal experience, it is recommended to download and use the [Cmder](https://cmder.app/) tool, which is ready to use without installation after extraction. Alternatively, the [XShell](https://www.xshell.com/en/free-for-home-school/) tool is an even better option.
</Note>

<Note>
  Mac Users: You can complete the SSH login using the system's built-in Terminal.
</Note>

## SSH Authentication

After starting the instance, locate the SSH login command.

<img src="https://mintcdn.com/gpuhub/hau6BtaiLdxackoK/images/ssh-entrance.png?fit=max&auto=format&n=hau6BtaiLdxackoK&q=85&s=adbb16ae2c4c8ec32175733155fa34aa" alt="" width="1478" height="448" data-path="images/ssh-entrance.png" />

Copy your SSH login command, which in this demonstration is: `ssh -p 33150 root@connect.singapore-b.gpuhub.com`.

<Note>
  In this command, the meanings of the parameters are as follows:

  * Username: root
  * Host: connect.singapore-b.gpuhub.com
  * Port Number: 33150
</Note>

Enter the command in your local terminal and enter your password to log in. *(Note: The password will not display any characters; press Enter after correctly typing or pasting with the 🖰 right-click of your mouse.)*

<img src="https://mintcdn.com/gpuhub/kr2R5AUmbxkNDmZd/images/ssh-teminal.png?fit=max&auto=format&n=kr2R5AUmbxkNDmZd&q=85&s=b5d567b74a29be7faa32e00d006218d9" alt="" width="2304" height="1674" data-path="images/ssh-teminal.png" />

<Warning>
  If you run a training program after logging in via SSH, use screen/tmux to start a daemon process to ensure that the program execution is not affected by SSH connection interruptions! For details on how to use screen, see the section on [Daemon Processes]().
</Warning>

## Passwordless Authentication

Access the SSH key login settings from **Console -> Instances** to set up your public key for password-free login. For key generation instructions, see the provided link: [4.3 Git on the Server - Generating Your SSH Public Key](https://git-scm.com/book/en/v2/Git-on-the-Server-Generating-Your-SSH-Public-Key)

<img src="https://mintcdn.com/gpuhub/hau6BtaiLdxackoK/images/ssh-config-ssh.png?fit=max&auto=format&n=hau6BtaiLdxackoK&q=85&s=82109f16a6afab64b877a9056b6a4033" alt="" width="1477" height="519" data-path="images/ssh-config-ssh.png" />

<img src="https://mintcdn.com/gpuhub/hau6BtaiLdxackoK/images/ssh-set-pwd.png?fit=max&auto=format&n=hau6BtaiLdxackoK&q=85&s=615f98c5f1c329f7afe645932e80e6c6" alt="" width="1675" height="703" data-path="images/ssh-set-pwd.png" />
