Last active
December 3, 2015 16:27
-
-
Save Committing/e46827ebcef49997ddf4 to your computer and use it in GitHub Desktop.
Easily ssh into servers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
print "" | |
print "Please type in server choice." | |
print "s1,s2,s4,s5,vm1,vm2,vm3,vm4,vm5,node,web etc..." | |
print "" | |
server = raw_input() | |
print "" | |
conversion_array = { | |
's1': { | |
'ip' : '', | |
'standard_username' : '', | |
'standard_password' : '', | |
'root_username' : '', | |
'root_password' : '' | |
}, | |
's2': { | |
'ip' : '', | |
'standard_username' : '', | |
'standard_password' : '', | |
'root_username' : '', | |
'root_password' : '' | |
} | |
} | |
print '====================================' | |
print "SSH Username for " + server + " = " + conversion_array[server]['standard_username'] | |
print "SSH Password for " + server + " = " + conversion_array[server]['standard_password'] | |
print "Root Username for " + server + " = " + conversion_array[server]['root_username'] | |
print "Root Password for " + server + " = " + conversion_array[server]['root_password'] | |
print '====================================' | |
subprocess.call(["ssh", conversion_array[server]['standard_username'] + "@" + conversion_array[server]['ip']]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment