# Trellis SSH

**URL:** https://discourse.roots.io/t/trellis-ssh/22616
**Category:** trellis
**Tags:** trellis-cli
**Created:** 2022-03-17T21:27:48Z
**Posts:** 4

## Post 1 by @adleviton — 2022-03-17T21:27:48Z

When running the command `trellis ssh`, it seems to default to `ssh admin@yoursite.com`.

Is there any way to have it connect with `ssh my_admin_username@my.ip.address`?

---

## Post 2 by @swalkinshaw — 2022-03-17T21:35:20Z

Not currently. I assume `yoursite.com` should work regardless (since it would resolve to the same IP) right? So you’d mainly need a way to customize the admin user?

It’s not easy to do that in the CLI since it’s outside of the Ansible context. `trellis ssh` helps for default cases, but in yours I’d suggest just creating an entry in your personal `~/.ssh/config` file so you can just do `ssh some_name` :smile:

There’s lots of guides on it. Here’s a decent looking one: [Simplify Your Life With an SSH Config File](https://nerderati.com/2011/03/17/simplify-your-life-with-an-ssh-config-file/)

---

## Post 3 by @adleviton — 2022-03-17T22:15:46Z

Since I’m using CloudFlare, `yoursite.com` doesn’t return the actual IP address. And up until now, I’ve always changed `admin` to something else. Not the end of the world, and thanks for the link!

---

## Post 4 by @chrillep — 2023-06-14T20:23:14Z

Kinsta has the same issue.  
+1 for having a flag that enables the usage of trellis/hosts/[environment] variables when using the `trellis ssh` command :heart:

found a wp-cli package but could not get it to work if you have a port set in your ssh setting.

> **[GitHub - dword-design/wp-cli-ssh-command: Allows to create a persistent...](https://github.com/dword-design/wp-cli-ssh-command)**
>
> Allows to create a persistent connection to a site alias. - GitHub - dword-design/wp-cli-ssh-command: Allows to create a persistent connection to a site alias.

`wp package install https://github.com/dword-design/wp-cli-ssh-command.git`

fixed in

` wp package install https://github.com/chrillep/wp-cli-ssh-command.git`
