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
?
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
?
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
There’s lots of guides on it. Here’s a decent looking one: Simplify Your Life With an SSH Config File
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!
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
found a wp-cli package but could not get it to work if you have a port set in your ssh setting.
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