Reputation: 353
I'd like to make a python script that connect with an SSH server, but as I can't send password as an argv
, how could I do that?
os.system("user@server password")
And if it fails, what would be the return?
Upvotes: 0
Views: 426
Reputation: 8620
Use Paramiko:
client = paramiko.SSHClient()
client.connect('my.example.com', username='brandon', password=mypass)
Upvotes: 1
Reputation: 979
You should probably looking into doing this with a library or wrapper to make this work out properly and with more support. Here are some examples.
Upvotes: 2