Need to setup ssh key pairs between Windows and RHEL server

I need to transfer the output of an audit script that is being generated on a Windows and RHEL server over to a RHEL server (acting as a data repository). I was told that the process needs to be automated (no human interaction) and secure, thus something like WinSCP or SFTP would be needed to transfer the file from the Windows server to the RHEL server.

Samba has been considered as a transport platform from the Windows server to the RHEL repository server, but since this would require a userid/password to be re-entered and possibly the drive re-mapped if the Windows server was rebooted, thus no longer a viable option.

Even though I am primarily a Linux guy, I have never setup ssh key pairs... not even on a Linux servers so I would like to get a basic 'how-to' document or at least a reference to a site that has the steps available and/or easy to step through for both Windows and Linux platforms (RHEL/CentOS preferred).
LVL 29
Michael WorshamStaff Infrastructure ArchitectAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.



What I understand is: If samba service is enabled in the linux server i..e. even if the server gets reboot,when it comes up, the samba service is started automatically during the booting (chkconfig smb on), and if we have defined the directory correctly in /etc/samba/smb.conf then this directory will be available for sharing.

Coming to windows machine,while mounting the linux server directory for the first time,you have to enter drive name (say z:),linux server's directory (say : /home/testuser),then you have to enter username and password. In addition to above,if you check the option:Reconnect at logon,then even though the windows machine gets rebooted,once it comes up,it will mount the same drive again automatically.

This approach looks simple and easy.

If this is fine then ok,otherwise we will think how to go ahead with what you were asking initially.
This is a tutorial for putty:

Putty is ssh client, for file transfer you can use pscp, which can be downloaded there:

After establishing keyless login with putty, you can use putty's session with scp:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Michael WorshamStaff Infrastructure ArchitectAuthor Commented:
@deepak_iq: Samba and a mapped directory is a backup if I cannot get ssh key pairs working in-between Windows and other Linux servers to access the main RHEL/Linux repository.

Take a look at

They have a series of solutions that will enable you to do what you are looking to do between Windows and RHEL.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.