1752273 Members
4508 Online
108786 Solutions
New Discussion юеВ

Re: ssh without password

 
heaman1
Regular Advisor

ssh without password


I know ssh-keygen -t rsa can public key to let local user login / scp to remote server without password , if I use this method to set it , ALL scp / remote login is no need to input password , can advise if I want only a specific ( not all ) jobs can do it ( without password to scp / remote login ) , what can i do ? thx
9 REPLIES 9
Ganesan R
Honored Contributor

Re: ssh without password

Hi Heaman,

ssh password less login is user specific. If you setup a ssh password less login for a specific user then all ssh/scp/sftp/slogin won't require password to specific destination server where you have put the public key.

I don't think you can restrict with specific job.
Best wishes,

Ganesh.
heaman1
Regular Advisor

Re: ssh without password

thx reply ,

if I want to let specific job to password less to run , what can i do ? thx
Nido
Trusted Contributor

Re: ssh without password

Hi,

As Ganesan stated passwordless ssh will be user specific.
You can have your job owned by specific user and have that user passwordless authentication using SSH.


Thanks,
" Let Villagers Be Happy!! "
heaman1
Regular Advisor

Re: ssh without password

thx ,

If I would like to do it , except passwordless ssh , is there other method ? thx
Vikas Thorat
Advisor

Re: ssh without password

Hi Heaman1,

If your user is intend to do only that specific job then you can follow below steps :

1)This specific user should have shell /usr/bin/rsh
2) Create a directory (/home/username/bin) where all your required commands / binaries will reside so this user can execute only these benaries (remotely)
3)Under this users profile specify PATH variable to : export PATH=/home/username/bin
4)Whatever command and files you are going to execute should have respective file permissions for this specific user.

Hope, this way around will work in your case.

Please, assign points if the solution found suitable.

regards,

Vikas Thorat
Success is not a Permanent & Failure is not Final! So,Never Stop Working after Success & Never Stop Trying after Failure!
Sajjad Sahir
Honored Contributor

Re: ssh without password

once u downloaded software

please make in users home directory .ssh directory

if ssh from first server to second server then cut and paste public key from server one in $HOME/.ssh/authorized_keys on server two
reverse the process for reverse.

$HOME and $HOME/.ssh must not be writable by group or other.

thanks and regards

Sajjad Sahir
Suraj K Sankari
Honored Contributor

Re: ssh without password

Hi,

Just create a new user keep all the things are same means permissions, home directiory but make it passwd less and give to that particular customer.

Suraj
Ganesan R
Honored Contributor

Re: ssh without password

Hi Heaman1,

>>If I would like to do it , except passwordless ssh , is there other method ?<<

if you still don't want to go for standard password less login method, you should try with tools like "expect"

With the help of this tool, you can issue password inside the script. You can use that script to ssh/scp/sftp.

You can download expect from here.
http://expect.nist.gov/

Refer this recent thread on how to configure the script.

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1337805

Also this

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1005570

Best wishes,

Ganesh.
Steven E. Protter
Exalted Contributor

Re: ssh without password

Shalom,

Individual users can exchange ssh passwords via public key exchange.

http://www.hpux.ws/?p=10

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