> For the complete documentation index, see [llms.txt](https://sarpers-organization.gitbook.io/ctftricks/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sarpers-organization.gitbook.io/ctftricks/_chapter-intro-8/linux/lateral-movement-linux-ssh.md).

# Ssh

## Ssh Login With Discovered Credentials

Use discovered credentials (e.g., `user:password`) to log in to the target system via SSH.

The basic command structure for connecting via SSH is:

```bash
ssh username@ipaddress
```

or

```bash
ssh user@host
```

Replace `username` with the discovered username and `ipaddress` or `host` with the target system's IP address or hostname.

For example, if the user `jboss` with password `likeaboss` was found, the login command would be:

```bash
ssh jboss@[Target_IP]
```

After you execute the above command, you will be prompted to enter the password for the specified user. Enter the discovered password when prompted.

Alternatively, the `sshpass` command can be used to automate SSH login with a password, although this is generally less secure than key-based authentication. The command format is:

```bash
sshpass -p 'password' ssh user@hostname
```
