Unix/Linux Go Back    


Windows & DOS: Issues & Discussions All Windows and DOS questions should go here as well. Discuss UNIX to Windows (Desktop or Server) here!

Passwordless login from Linux server to windows server

Windows & DOS: Issues & Discussions


Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 12-02-2015
pratria pratria is offline
Registered User
 
Join Date: Dec 2015
Last Activity: 4 December 2015, 11:53 PM EST
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
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?
Sponsored Links
    #2  
Old Unix and Linux 12-02-2015
RavinderSingh13 RavinderSingh13 is online now Forum Advisor  
Registered User
 
Join Date: May 2013
Last Activity: 22 January 2017, 3:13 PM EST
Location: Chennai
Posts: 2,357
Thanks: 517
Thanked 1,096 Times in 993 Posts
Hello pratria,

Welcome to forums, by seeing your error which is:
Quote:
it says connection refused with port 22.
While on the server, check to make sure sshd is actually running, and is listening on port 22:

Code:
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

Last edited by RavinderSingh13; 12-02-2015 at 08:46 AM.. Reason: Adding windows command to solution now.
Sponsored Links
    #3  
Old Unix and Linux 12-02-2015
Peasant's Unix or Linux Image
Peasant Peasant is online now Forum Advisor  
Registered User
 
Join Date: Mar 2011
Last Activity: 22 January 2017, 2:57 PM EST
Posts: 1,016
Thanks: 27
Thanked 283 Times in 253 Posts
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.
    #4  
Old Unix and Linux 12-02-2015
cjcox cjcox is offline
Registered User
 
Join Date: May 2005
Last Activity: 27 June 2016, 2:12 PM EDT
Posts: 614
Thanks: 4
Thanked 109 Times in 106 Posts
cygwin ssh works. I've used this to backup data off my Windows host (passwordless by key).
Sponsored Links
    #5  
Old Unix and Linux 12-04-2015
bakunin bakunin is offline Forum Staff  
Bughunter Extraordinaire
 
Join Date: May 2005
Last Activity: 22 January 2017, 5:48 AM EST
Location: In the leftmost byte of /dev/kmem
Posts: 5,300
Thanks: 94
Thanked 1,432 Times in 1,066 Posts
Moderator's Comments:
Passwordless login from Linux server to windows server putting the thread to a fitting board....


@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
Sponsored Links
    #6  
Old Unix and Linux 12-05-2015
pratria pratria is offline
Registered User
 
Join Date: Dec 2015
Last Activity: 4 December 2015, 11:53 PM EST
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
@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.
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Passwordless sftp connection from UNIX to windows server Jcpratap Windows & DOS: Issues & Discussions 0 03-12-2015 04:28 AM
How to connect Linux server (configure two way authentication) with Windows server? manjusharma128 Linux 0 05-28-2014 01:28 AM
Copy files from Linux server to Windows server arunmanas Shell Programming and Scripting 3 08-13-2013 04:25 AM
Connect (SSH) to Windows server via Linux server through a script and passing command.. but failing sunil seelam Shell Programming and Scripting 5 06-19-2013 12:05 PM
passwordless login from a server to another server johnl Shell Programming and Scripting 2 05-16-2008 09:27 AM



All times are GMT -4. The time now is 04:17 PM.