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   -   Original Discussion by pratria
pratria's Unix or Linux Image
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   -   Original Discussion by pratria
RavinderSingh13's Unix or Linux Image
RavinderSingh13 RavinderSingh13 is offline Forum Advisor  
Registered User
 
Join Date: May 2013
Last Activity: 23 January 2018, 11:55 AM EST
Location: Chennai
Posts: 2,689
Thanks: 594
Thanked 1,278 Times in 1,149 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   -   Original Discussion by pratria
Peasant's Unix or Linux Image
Peasant Peasant is online now Forum Advisor  
Registered User
 
Join Date: Mar 2011
Last Activity: 23 January 2018, 12:56 PM EST
Posts: 1,113
Thanks: 32
Thanked 332 Times in 286 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   -   Original Discussion by pratria
cjcox's Unix or Linux Image
cjcox cjcox is offline
Registered User
 
Join Date: May 2005
Last Activity: 27 June 2016, 2:12 PM EDT
Posts: 614
Thanks: 4
Thanked 110 Times in 107 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   -   Original Discussion by pratria
bakunin's Unix or Linux Image
bakunin bakunin is offline Forum Staff  
Bughunter Extraordinaire
 
Join Date: May 2005
Last Activity: 22 January 2018, 12:33 PM EST
Location: In the leftmost byte of /dev/kmem
Posts: 5,678
Thanks: 112
Thanked 1,633 Times in 1,198 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   -   Original Discussion by pratria
pratria's Unix or Linux Image
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 01:58 PM.