davydany / sultan

Sultan: Command and Rule over your Shell
https://sultan.readthedocs.io/en/latest/
MIT License
680 stars 35 forks source link

Use custom user for SSH connection #46

Closed Jenselme closed 7 years ago

Jenselme commented 7 years ago

Hi,

I think it would be useful to be able to select which user to use when running an SSH connection. The syntax could be something like: with Sultan.load(hostname='aot@mydomain.com') as sultan.

It currently tries to connect me as jenselme@aot@mydomain.com which is invalid.

davydany commented 7 years ago

Try this:


with Sultan.load(user='aot', hostname='mydomain.com') as sultan:
    sultan.ls('/').run()
davydany commented 7 years ago

Let me know if that works for you, and close the ticket if it works for you.

Jenselme commented 7 years ago

It works, thanks.