LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-16-2011, 05:22 PM   #1
blainemiller
Member
 
Registered: Dec 2003
Posts: 78

Rep: Reputation: 1
scp/ssh to cygwin server from linux server without password prompt...


Hello,

I've seen how to do this from native linux native server to linux native server. Not a problem. My question has to do with ssh/scp exchange of key exchange between a windows cygwin server and a linux server.

There seems to be no /home/root/.. to hold the key exchange files. I've tried this between a cygwin server with a /home/administrator/.. subdirectory and the /root subdirectory on the linux server. Is this how I should do this?

Someone else set this up between these two servers earlier but forgot to document how it was done in his notes.

I don't want to break the existing systems by setting up the key generation incorrectly on the functioning pair's of servers.

Help/validation would be appreciated. Thanks!

Blaine
 
Old 05-17-2011, 03:52 AM   #2
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
With which user account you want to connect in which direction? You can specify a dedicated user in the ssh/scp command, in case they differ between the systems.
 
Old 05-17-2011, 04:40 AM   #3
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
Quote:
There seems to be no /home/root/.. to hold the key exchange files. I've tried this between a cygwin server with a /home/administrator/.. subdirectory and the /root subdirectory on the linux server. Is this how I should do this?
STOP RIGHT THERE. You should never directly SSH as root. Always SSH as a normal user and then elevate to root when required. This is a sever security violation.

Key based authentication works perfectly fine with Cygwin, as long as you are using a normal user. Any of the many key based authentication guides should work. Cygwin will use normal RSA keys, unlike PUTTY for example where it is necessary to alter them into the correct format.
 
Old 05-17-2011, 05:01 AM   #4
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
Quote:
Originally Posted by Noway2 View Post
STOP RIGHT THERE. You should never directly SSH as root. Always SSH as a normal user and then elevate to root when required. This is a sever security violation.
In principle I completely agree. But there are cases, where you need it and: you can limit root login to a certain source machine, allow it only with ssh-keys while users can still use password, make it hostbased only for root, limit it to one network interface, run a second ssh daemon on a different port just for this purpose...
 
Old 05-17-2011, 11:15 AM   #5
blainemiller
Member
 
Registered: Dec 2003
Posts: 78

Original Poster
Rep: Reputation: 1
All good points...

I do understand the issue of root based communications. I agree that they should not be root'ed due to security considerations. In this case, I am operating internally from one internal server to another internal server. Due to requirements beyond the scope of this question I do have to go with a root based ssh/scp.

The question, and I'll try to be more detailed, is how do I do the key exchange between a cygwin server and a linux server?

As an example, I have a server, sm-i222, running cygwin over a windows 2003R2 OS. I have a linux server,10.0.0.6, running RHEL 4.7.

I need to scp some large files from 10.0.0.6 to the cygwin server without prompting for a password. This transfer is being called via a crontab job.

the usual means of exchanging keys would be to login as root on the local machine. In this case the local machine is the cygwin machine and therefor has no root UserID. The cygwin server uses an administrator, windows UserID.

So, if I do the key exchange process between the administrator account on the cygwin system and the root account on the linux machine will this work in the sense I won't be prompted for a password when I ssh/scp files from the linux server to the cygwin server?

Thanks for your help and assistance.

Blaine
 
Old 05-17-2011, 11:21 AM   #6
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
I see no reason why it shouldn't work. You need just to specify the Windows admin user in the cron scp command.
 
Old 05-17-2011, 04:02 PM   #7
blainemiller
Member
 
Registered: Dec 2003
Posts: 78

Original Poster
Rep: Reputation: 1
Thanks for the info! I'll be checking out the proposed solution tonight. I was hesitant to simply do the key generation as the passwordless connectivity was already working for some hosts. I hate to break something that's already working, sort of.

Thanks!

Blaine
 
Old 05-18-2011, 02:04 PM   #8
blainemiller
Member
 
Registered: Dec 2003
Posts: 78

Original Poster
Rep: Reputation: 1
It worked! Thanks to all for your assistance and validation...

Blaine
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Configuring the Linux server to login to Windows server without password using SSH srajeshkumar Linux - Server 2 03-09-2011 09:49 PM
free winxp openssh (beside f-secure ssh server & cygwin) to connect winxp from linux imnoob Linux - General 3 12-06-2007 12:26 PM
Access Denied when I try to login remotely to my SSH server running on Cygwin. andrew_cz General 0 05-02-2006 09:46 AM
scp, don't prompt password!! dlublink Linux - Networking 1 01-03-2005 12:54 PM
ssh/scp via a windows proxy server saleemlqorg Linux - Networking 2 01-09-2004 05:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration