0

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?

1
  • what do you want to do after connecting? Commented Mar 22, 2013 at 3:34

3 Answers 3

2

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.

Sign up to request clarification or add additional context in comments.

Comments

2

You can use some 3rd libraries like fabric or Paramiko

Comments

1

Use Paramiko:

client = paramiko.SSHClient()
client.connect('my.example.com', username='brandon', password=mypass)

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.