Passwordless login from Linux server to windows server

Hi,
I am a newbie and has been given a task to connect to a windows server from a linux server (using putty of course; for file transfer) that too passwordless.

Searching through google I found "ssh-keygen" but this also couldn't work because as I tried ssh <username>@<windowsServerIP>, it says connection refused with port 22.

Can anyone please help me out in this?

Hello pratria,

Welcome to forums, by seeing your error which is:

While on the server, check to make sure sshd is actually running, and is listening on port 22:

On UNIX:
netstat -anp | grep sshd
ON Windows(in cmd as admin you should run):
netstat -ab | find ":22"

If you don't get results, or they don't show you're listening on tcp 0.0.0.0:22... fix that. If you DO show that sshd is running and is listening on tcp port 22, check to make sure there's no firewall rule getting in the way. You could take it as a starting point or so, do share with us how it goes for you.

Thanks,
R. Singh

If you want to connect from windows to Linux server via ssh protocol, the windows server must have ssh server installed and running.

You might want to check freesshd or cygwin ssh.

cygwin ssh works. I've used this to backup data off my Windows host (passwordless by key).

@pratria: please watch where you open your threads. This (Contact Site Admins and Mods) is a non-technical forum and should be used for account technicalities only. Thank you for your consideration.

bakunin

@RavinderSingh13: sshd is running and is listening on port 22. However I couldn't check the firewall rule.
We used sshpass command in the script itself for transferring files using sftp command.
@bakunin: Thank you for the guidance and I will take care of it in future.