Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-16-2011, 05:22 PM
|
#1
|
Member
Registered: Dec 2003
Posts: 78
Rep:
|
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
|
|
|
05-17-2011, 03:52 AM
|
#2
|
Senior Member
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339
|
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.
|
|
|
05-17-2011, 04:40 AM
|
#3
|
Senior Member
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125
|
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.
|
|
|
05-17-2011, 05:01 AM
|
#4
|
Senior Member
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339
|
Quote:
Originally Posted by Noway2
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...
|
|
|
05-17-2011, 11:15 AM
|
#5
|
Member
Registered: Dec 2003
Posts: 78
Original Poster
Rep:
|
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
|
|
|
05-17-2011, 11:21 AM
|
#6
|
Senior Member
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339
|
I see no reason why it shouldn't work. You need just to specify the Windows admin user in the cron scp command.
|
|
|
05-17-2011, 04:02 PM
|
#7
|
Member
Registered: Dec 2003
Posts: 78
Original Poster
Rep:
|
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
|
|
|
05-18-2011, 02:04 PM
|
#8
|
Member
Registered: Dec 2003
Posts: 78
Original Poster
Rep:
|
It worked! Thanks to all for your assistance and validation...
Blaine
|
|
|
All times are GMT -5. The time now is 12:57 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|