1 - Verified whether paramiko code able to connect to instance with sudo access 2 - After above succesful run, I tried to execute this command -
ssh_client.exec_command(command)
command = sudo su - abc -c 'sftp -o <path to ssh key> -o Port=22 <username@server.com>'
Question - Do not see any output script gets stuck.
I have also looked into doc - pysftp doc and paramiko doc
Any suggestion appreciated thank you