Windows – Passwordless ssh from Windows to Linux to run scripts from command prompt

known-hostspasswordsshunixwindows

What am trying here is …..

  • I Have some scripts that needs to run in Windows Command (command.exe) and not from Cygwin.
  • The scripts needs to access a specific Linux machine from Windows command prompt and it asks for a password every time the script runs.

How can i set a password-less authentication from Windows to Linux machine?

How can i check from a Windows Command Prompt if a Linux machine is already passwordless?

Thanks in advance.

Best Answer

I would recommend using Pageant. PuTTY combined with Pageant has a number of options for use from the command line. Check out the documentation for specifics to what you want to do.

You will need to generate the private / public key pair on the Linux machine. The Windows machine uses the private key for the user on the Linux host.