1

I'm trying to find a way to automatically enter a password when starting an SSH session. Is there a way to do that? I'm using openssh on Win10 to connect to my remote server.

Thank you

  • Not a direct answer to your question, but have you considered using SSH keys instead of passwords? This would solve your problem, unless you're required to use the password. – Jason Floyd May 09 '19 at 18:07

1 Answers1

2

Migrate off of passwords to ssh keys. Consider storing passphrases for these in ssh-agent.

If you must automate a password, use the sshpass program. It has less insecure options like reading from environment variables or pipes, and tricks ssh's TTY check for you.

John Mahowald
  • 32,050
  • 2
  • 19
  • 34