Issue
I want to connect via ssh using python. I've tried this command: os.system("cmd /k root@ip) and it worked well. the problem is that after this a password is required and it is not clear to me which command shall I use. Furthermore I noticed that the os.system command stay "alive" and doesn't allow the code to go on the next step until the shell is not closed.
Solution
Have you tried using paramiko?
import paramiko
ssh_client = paramiko.SSHClient()
ssh_client .connect(server, username=username, password=password)
stdin, stdout, stderr = ssh_client.exec_command(command)
Answered By - Adid Answer Checked By - David Marino (WPSolving Volunteer)