1828578 Members
2653 Online
109982 Solutions
New Discussion

Re: ssh configuration

 
R.O.
Esteemed Contributor

ssh configuration

I posted this messages in HPUX administration although this question is about two Red Hat linux:

Hi all,

I have a server and a workstation wich connect with the server using ssh. I want to use scp to copy files from the server to the workstation even if I have to use rhost. I don??t know how to configure the sshd_config of the workstation to allow scp from the server.
Any help will be useful,

Thanks and regards,

R.O.
"When you look into an abyss, the abyss also looks into you"
10 REPLIES 10
Steven E. Protter
Exalted Contributor

Re: ssh configuration

As noted in your HP-UX thread(which is where I'd prefer points handed if any), the way to go is exchanging public keys.

Attaching the cookbook, for your convenience.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Alexander Chuzhoy
Honored Contributor

Re: ssh configuration

I hope I understood right-By default you don't have to configure this.

Simply issue this command from the server:
scp filename targetIP:/path

then you'll be prompted for password- just give one.If it's root's directory-then it's suppose to be root's password, and if it's some user's then the password respectively should be the user's.
regards.
Steven E. Protter
Exalted Contributor

Re: ssh configuration

Yes Alexander, you need not configure public keys. It is however secure, so long as permissions on the two .ssh folders is tight.

It provides a nice, secure way to copy files between systems via an automated metodology, as in a script. Taking humans out of the equation cuts down on mistakes.

SEP

Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
R.O.
Esteemed Contributor

Re: ssh configuration

Hi,

Thanks for your responses. The problem I have is that I don??t want to be prompted for a passwd. I want to do an script to automatically spc??s files from a system to other .

Regards
"When you look into an abyss, the abyss also looks into you"
R.O.
Esteemed Contributor

Re: ssh configuration

Hi,

Thanks for your responses. The problem I have is that I don??t want to be prompted for a passwd. I want to do an script to automatically spc??s files from a system to other .

Regards
"When you look into an abyss, the abyss also looks into you"
Dave Falloon
Trusted Contributor

Re: ssh configuration

You still need to enter a passphrase if you use public keys. The difference is that you can use ssh agent to hold your keys so that you only need to enter the passphrase once per boot as long as ssh agent is the parent process to your login.

ie. in your .xsession file you would have something like:

ssh-agent wmaker

so that the agent will handle ssh keys for all ssh connections started under your wmaker session.

It has been my experience that passwordless and single passphrase sshing is still a pain in the butt, because if the server/workstation is rebooted you have to login and restart the agent and load your keys into it again.

But its better than opening the huge rtools hole.

I hope that helps,

Dave
Clothes make the man, Naked people have little to no effect on society
Steven E. Protter
Exalted Contributor

Re: ssh configuration

If you follow the document I attached and hit when prompted for a passphrase during key generation, you will not be prompted for a passphrase when you use scp.

Its a good document, written by Chris Vail and its worked for me dozens of times. It works for Linux, HP-UX, Solaris, any platform that can run openssh.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Huc_1
Honored Contributor

Re: ssh configuration

I use sftp and dont get prompted for the paraphrase, and wish i had know about the document SEP has attached before i attempt to set it up the first time, would have saved me lot's of trouble , use/follow this document you should be fine.

J-P
Smile I will feel the difference
R.O.
Esteemed Contributor

Re: ssh configuration

Hi Steven,

Your document is what I want. I have followed these steps and works fine.

Thanks to all for your help,

Regards

R.O.
"When you look into an abyss, the abyss also looks into you"
Jerome Henry
Honored Contributor

Re: ssh configuration

Hi,

So maybe could you assign Steven a rabbit, as he solved your problem... it helps people browsing the forum to know that the question asked in the thread title has an answer in the posts.
Just assign 10 points to one of his replies...

Tks

J
You can lean only on what resists you...