摘要:
defssh_cmd(ip,passwd,cmd,newpwd): ret= -1 ssh=pexpect.spawn('ssh -q -p36000 root@%s "%s"'%(ip,cmd)) try: i=ssh.expect(['password:','continue connecting (yes/no)?'],timeout=5) ifi==0: ssh.sendline(passwd) elifi==1: ssh.sendline('yes\n') ssh.expect('passwo 阅读全文
摘要:
Plink (PuTTY Link) is a command-line connection tool similar to UNIXssh. It is mostly used for automated operations, such as making CVS access a repository on a remote server.Plink is probably not what you want if you want to run an interactive session in a console window.7.1 Starting PlinkPlink is 阅读全文