Closed filips123 closed 1 month ago
Can you try @ssh/server-alias
?
Yes, that works. Is it possible to add back support for aliases without @ssh/
prefix, as it was supported in previous versions and is slightly shorter to type?
I guess that the problem is that pyinfra now checks if the hostname resolves correctly, which SSH aliases don't. I didn't check how it was handled in previous versions and why the check is needed. Maybe it can be extended to support SSH aliases or just removed?
I'm very new to pyinfra, so I can't answer all of your questions :sweat_smile:
You might be able to use something like this to check if the provided alias resolves (e.g. in case socket.getaddrinfo()
raises).
You might be able to use something like this to check if the provided alias resolves (e.g. in case
socket.getaddrinfo()
raises).
I'll give this a go.
Describe the bug
In pyinfra 2.7, it was possible to run a deploy to a SSH alias defined in
~/.ssh/config
file, like this:In pyinfra 3.0.2, this is no longer possible, and fails with:
To Reproduce
Add an alias to your
~/.ssh/config
:Try to deploy to that alias:
Expected behavior
pyinfra should detect that this is a host alias and use it to connect to the server.
Meta