Rather than doing anything with passwords, you should instead use public
key authentication. This involves creating a keypair with ssh_keygen,
putting the private key on the machine opening the ssh connection
(~/.ssh/id_rsa), then listing the public key in the remote system's
~/.ssh/authorized_key
I would like to write a Python code like this:It can login a host by SSHafter login the host, use SCP to get a remote file, so it can deliver file to the host.then execute the programthen leave the hostFor example :STEP 1. ssh [EMAIL PROTECTED]STEP 2. Enter the password automatically STEP 3. run "