python2.x : automating ssh with subporcess call
Hi Friends,
I am new to python, kind of migrating from bash to python. here is thing I am trying to do with my pythong script. ssh system and get some info from that system. I want it all automated. here is where I am strucked script is pormpting me for ssh password given below is my script OS : fedora20 sshd daemon is running. Code:
#!/usr/bin/python Code:
$python ./python_ssh.py 192.168.1.20 regards |
Hi,
I think your approach is less than ideal. You should not be treating passwords like that. Look into using RSA authentication. Also, using Popen or similar should be a last resort - use existing libraries. See for example https://wiki.python.org/moin/SecureShell Evo2. |
All times are GMT -5. The time now is 08:55 AM. |