I'm encountering weird behaviour. When the following python script runs in PyCharm editor (not via command line)
sshCommand = "ssh %s@%s -p %s %s" % user,ip,port,cmd
completedProc = subprocess.run(sshCommand,
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
check=True,
universal_newlines=True)
no prompt asking for passphrase for private ssh key is popped.
Though, when the same python script is run in command line:
python3 script.py
The prompt does appear. Does PyCharm store somewhere the passprase? Is it possible to achieve the same behaviour for running via command line?
Found answers to the second question:
How to avoid being asked passphrase each time I push to Bitbucket
How do I remove the passphrase for the SSH key without having to create a new key?