Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- import sys
- import paramiko
- # Create the argvs
- switch=sys.argv[1]
- port=sys.argv[2]
- ssh = paramiko.SSHClient()
- ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
- ssh.connect(switch, port=22, username='rcuser', password="andy_cole",)
- stdin, stdout, stderr = ssh.exec_command('show ethernet-switching table interface ' +port)
- output = stdout.readlines()
- print '/n'.join(output)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement