LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-28-2009, 02:40 AM   #1
shad.ithbti
LQ Newbie
 
Registered: Aug 2009
Posts: 4

Rep: Reputation: 0
Unhappy rsh <hostname> <script path> giving permission denied error


hello i have one Linux Box linux RHEL 4.

i have a perl script in which i am executing command rsh <hostname> <script path>

but i was getting error could not connect to host.
then i added IP address of the host server to /etc/hosts file of my linux box, then it started giving permission denied error.

what i am trying to do here is executing scripts remotely without having to enter password and login name of the remote servers.

Anykind of help is appreciated.

Thanks,
shadman
 
Old 08-28-2009, 05:03 AM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650
Hi Shadman,

I think most people would agree that the 'r' commands should be avoided whenever possible, any reason you cant use ssh with key based authentication ?

cheers,

kbp
 
Old 08-29-2009, 02:31 AM   #3
shad.ithbti
LQ Newbie
 
Registered: Aug 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Smile

Quote:
Originally Posted by kbp View Post
Hi Shadman,

I think most people would agree that the 'r' commands should be avoided whenever possible, any reason you cant use ssh with key based authentication ?

cheers,

kbp

Hi, actually i have some existing scripts which are using rsh for remote login, but we stopped using those scripts for a while, and now i am again trying to reuse those scripts for my task, i am just trying to avoid the rework here by using the same scripts, there is not strong reason for not using ssh , would it be possible to login wihtout password using ssh, if possible then how could i do that , it would be good if you mention the steps here.

i want to do it for all flavours of Unix.
 
Old 08-29-2009, 11:06 PM   #4
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650
Hi shadman,

Most ssh releases these days have an automated key distribution method,
eg. RHEL/Fedora has ssh-copy-id

There is a script called ssh-propagate in the rkutils package which you could run from any distro/flavour:

http://people.redhat.com/rkeech/#rktutils

cheers,

kbp
 
Old 08-31-2009, 03:54 AM   #5
shad.ithbti
LQ Newbie
 
Registered: Aug 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Unhappy

Quote:
Originally Posted by kbp View Post
Hi shadman,

Most ssh releases these days have an automated key distribution method,
eg. RHEL/Fedora has ssh-copy-id

There is a script called ssh-propagate in the rkutils package which you could run from any distro/flavour:

http://people.redhat.com/rkeech/#rktutils

cheers,

kbp

i didn't got what you mentioned.

ssh hostname <script_path> should work without prompt for password, that's what i am trying to achieve. i will be running this command on Linux and host will solaris.

Thanks,
Shadman
 
Old 08-31-2009, 07:55 AM   #6
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650
Hi shadman,

To ssh to another host without being prompted for a password, you need to distribute your ssh public key to the destination host. The utilites I mentioned will do this for you, it can also be done manually.
Once this process is complete you will be able to run a script on the remote host as you require without being prompted for a password

cheers
 
  


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
rsh -l option permission denied error kgopal30 Linux - Server 1 09-28-2011 09:06 PM
su cvs is giving .bashrc permission denied error prasad_ark Linux - Software 1 07-02-2008 05:13 AM
rsh permission denied eozcan Linux - Security 2 12-07-2004 09:26 AM
Uploading files using PHP giving Permission Denied error MatthewG Programming 4 05-27-2004 03:38 PM
rsh. Permission denied pedroem Linux - Networking 2 10-09-2002 02:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:10 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration