摘要:
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
阅读全文
posted @ 2011-08-02 23:44
Cursorkey
阅读(918)
推荐(0)
编辑
摘要:
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
阅读全文
posted @ 2011-08-02 23:24
Cursorkey
阅读(1529)
推荐(0)
编辑