MIHey Shoaib, If we are expecting a passcode that is generated at run time, we can use auth_interactive_dumb instead of auth_interactive . We can create a client object from the transport object to run commands on the server. client = SFTPClient.from_transport(trans) Let me know if this helped.Reply·Article·Jul 9, 2022·How-to: Python Paramiko