Hey 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.
Hey manikanta,
I am connecting to jump server which is asking password and passcode. first password gets verified then it ask passcode (code in form of digits coming from authenticator app). I tried your solution for this but later when I tried to execute commands, it gives me following error:
bad authentication type; allowed types: ['publickey', 'gssapi-keyex', 'gssapi-with-mic', 'password']further I need to execute commands and it also show transport has no option to execute commands. could you please figure it out?
I found one answer parallel from stack overflow its similar sitution but when I debug paramiko it shows authentication (password) failed, I am new user so can't share stack overflow link but I am sharing title of question below: Paramiko: password + sms-passcode autentification