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; --> On 8/25/06, Adam PAPAI <wooh@wooh.hu> wrote: > Greg Thomas wrote: > > I've got a little backup script piping ...


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
Greg Thomas
 
Posts: n/a
Default Re: Prompted for password even though ssh keys are setup

On 8/25/06, Adam PAPAI <wooh@wooh.hu> wrote:
> Greg Thomas wrote:
> > I've got a little backup script piping dump to ssh to my backup server
> > rice, and I've got my keys setup:
> >
> > =============================================
> > ethant@grits:/home/ethant# uname -a
> > OpenBSD grits 3.9 GENERIC#107 i386
> > ethant@grits:/home/ethant# ssh rice
> > Last login: Fri Aug 25 00:14:42 2006 from grits
> > OpenBSD 4.0-beta (GENERIC) #1083: Mon Aug 21 21:24:02 MDT 2006

>
> This means you can login with RSA key auth as root.
>


No, I can't:

root@grits:/root# ssh rice
root@rice's password:
Permission denied, please try again.

root@grits:/root# ^D
ethant@grits:/home/ethant# ssh rice
Last login: Fri Aug 25 09:58:40 2006 from corn.2fortheroad.net
OpenBSD 4.0-beta (GENERIC) #1083: Mon Aug 21 21:24:02 MDT 2006

Welcome to OpenBSD: The proactively secure Unix-like operating system.

Please use the sendbug(1) utility to report bugs in the system.
Before reporting a bug, please try to reproduce it with the latest
version of the code. With bug reports, please try to ensure that
enough information to reproduce the problem is enclosed, and if a
known fix for it exists, include that as well.

ethant@rice:/home/ethant#

Without introducing the script into the scenario it appears that my
SSH keys are setup properly for ethant.

>
> > ethant@grits:/home/ethant# cat test.sh
> > #!/bin/sh
> > /sbin/dump -0auf - /dev/rwd0a | gzip | \
> > ssh ethant@rice "cat > /grits/$(date "+%Y%m%d")_root.dump.gz"
> >
> > ethant@grits:/home/ethant# sudo test.sh
> > DUMP: Date of this level 0 dump: Fri Aug 25 00:23:42 2006
> > DUMP: Date of last level 0 dump: the epoch
> > DUMP: Dumping /dev/rwd0a (/) to standard output
> > DUMP: mapping (Pass I) [regular files]
> > DUMP: mapping (Pass II) [directories]
> > DUMP: estimated 39523 tape blocks.
> > DUMP: Volume 1 started at: Fri Aug 25 00:23:42 2006
> > DUMP: dumping (Pass III) [directories]
> > DUMP: dumping (Pass IV) [regular files]
> > ethant@rice's password:

>
> It seems you only have pubkey for the root@rice and not for ethant@rice.
> Please verify your pubkey in your .ssh/authorized_keys for user: ethant.


As above my pubkey seems to be fine.

As per another message adding ethant to operator and removing sudo
from the scenario works fine so I'll just leave it at that.

Greg

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 11:56 AM.


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