a = raw_input("Select your project: ")
stdin, stdout, stderr = ssh.exec_command('cd test \n cd software \n cd {0} \n ls'.format(a))
softwares = stdout.readlines()
我得到了這個輸出。但是,當我試圖得到下面的行代碼輸出, stdin
此問題與Taking the input from auto-execute user login using ssh execute command有關,我嘗試採用另一種方法解決當前問題。 由於paramiko循環永遠在等待用戶輸入命令。我無法殺死,有任何進展或做任何事情。 stdin, stdout, stderr = self.connection.exec_command(command)
我看到這個職位上計算器sftp server implementaion with Python 我試圖建立https://pypi.python.org/pypi/sftpserver蟒蛇SFTP服務器,但我似乎無法得到它的正常工作。 像上面的stackoverflow帖子,我想開發一種方法來連接ssh到交換機,我能夠使用paramiko,但是然後我需要能夠將文件/配置從交換機複製回窗口主機在哪