Skip to content

Instantly share code, notes, and snippets.

@Committing
Last active December 3, 2015 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Committing/e46827ebcef49997ddf4 to your computer and use it in GitHub Desktop.
Save Committing/e46827ebcef49997ddf4 to your computer and use it in GitHub Desktop.
Easily ssh into servers
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