Unix Technical Forum

Re: Prompted for password even though ssh keys are setup

This is a discussion on Re: Prompted for password even though ssh keys are setup within the lucky.openbsd.misc forums, part of the OpenBSD category; --> Greg Thomas wrote: > On 8/25/06, Alexander Hall <alexander@beard.se> wrote: >> Greg Thomas wrote: >> Here you are running ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > lucky.openbsd.misc

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-18-2008, 07:24 AM
Alexander Hall
 
Posts: n/a
Default Re: Prompted for password even though ssh keys are setup

Greg Thomas wrote:
> On 8/25/06, Alexander Hall <alexander@beard.se> wrote:
>> Greg Thomas wrote:


>> Here you are running the entire script as root (using sudo), and
>> therefore ssh is run as root, which does not have your keys.

>
> Understood but how come the exact setup works from my system corn to
> rice ( but not grits to rice)? corn is 3.8, grits is 3.9, and rice is
> 4.0. Default ssh setup on all three except for:
>
> PermitRootLogin no


One possibility could be that you have, on corn, copied the private key
into /root/.ssh/, e.g. /root/.ssh/id_rsa.

>> Possible solutions:
>> 1) Add yourself to group operator, which removes the need for ``sudo''.

>
> Yep, that works fine.
>
>> 2) Use sudo only for the dump command within the script.
>> 3) Instruct ssh to use the designated key using ``-i identity_file''


Just for fun, you could test pointing the ssh command to your
~ethant/.ssh/id_rsa and see if that "helps".

> Thanks for the tips.


I'm glad to help. I've built a little experience fiddling with
unencrypted private/public keys. One pair for backup, another for a
smtp-through-ssh-tunnel. Apart from adding a small initial delay
(noticable when on modem, albeit not used frequently enough to be
annoying), the smtp tunnel works great from any network.

/Alexander

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:45 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com