Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ssh error on user accounts [workaround found]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
flickerfly
l33t
l33t


Joined: 08 Nov 2002
Posts: 677
Location: Lanham, MD

PostPosted: Mon Nov 03, 2003 6:13 pm    Post subject: ssh error on user accounts [workaround found] Reply with quote

I deleted ~/.ssh, but am still getting the following error.

Code:
ssh_askpass: exec(/usr/lib/misc/ssh-askpass): No such file or directory
Host key verification failed.


I can ssh successfully as root. I don't have any other accounts on the box atm. Also, askpass is not installed, only ssh. This just showed up after returning to work after the weekend.

Code:
>> emerge -s askpass
Searching...   
[ Results for search key : askpass ]
[ Applications found : 2 ]
 
*  net-misc/gtk2-ssh-askpass
      Latest version available: 0.3
      Latest version installed: [ Not Installed ]
      Size of downloaded files: 13 kB
      Homepage:    http://www.cgabriel.org/sw/gtk2-ssh-askpass/
      Description: A small SSH Askpass replacement written with GTK2.

*  net-misc/x11-ssh-askpass
      Latest version available: 1.2.2-r1
      Latest version installed: [ Not Installed ]
      Size of downloaded files: 28 kB
      Homepage:    http://www.liquidmeme.net/software/x11-ssh-askpass/
      Description: X11-based passphrase dialog for use with OpenSSH


I used which to check to make sure root and I are running the same binary and they are both at /usr/bin/ssh. Anyone have any other ideas for me?
_________________
An Evil Genious' Guide to Sheeple and How To Avoid Becoming One | 0x4C9EF4A


Last edited by flickerfly on Thu Nov 06, 2003 2:45 pm; edited 1 time in total
Back to top
View user's profile Send private message
ariejan
Tux's lil' helper
Tux's lil' helper


Joined: 01 Jun 2002
Posts: 100
Location: Eindhoven, The Netherlands

PostPosted: Mon Nov 03, 2003 6:52 pm    Post subject: Reply with quote

ssh as root is bad. Add a normal user account, and just ssh to the box. I don't know, but I've never in my life used ask-pass.
Back to top
View user's profile Send private message
flickerfly
l33t
l33t


Joined: 08 Nov 2002
Posts: 677
Location: Lanham, MD

PostPosted: Mon Nov 03, 2003 7:39 pm    Post subject: Reply with quote

I've never used askpass either and never ssh from root, except that I was troubleshooting here. It is unrealistic to switch users each time I want to ssh to another box. That changes permissions of the user and thereby means I have to re-chmod all my files what I want to send over the connection with scp which is a large part of what I do with ssh.

I need to know what the problem is. I've got work arounds.
_________________
An Evil Genious' Guide to Sheeple and How To Avoid Becoming One | 0x4C9EF4A
Back to top
View user's profile Send private message
Jaxom
Tux's lil' helper
Tux's lil' helper


Joined: 31 Jan 2003
Posts: 137

PostPosted: Mon Nov 03, 2003 7:49 pm    Post subject: Reply with quote

I would try adding a new user to the box and trying to ssh with the new account. That will aleast narrow it down a little. It's possible it's something in your specific user account.

I'm not the best diagnostician though, just thought I'd offer a suggestion as to where I would look first :)
_________________
Undisputed Heavyweight Champion. If it's undisputed, WHAT'S ALL THE FIGHTING ABOUT?!?! -- George Carlin
Back to top
View user's profile Send private message
flickerfly
l33t
l33t


Joined: 08 Nov 2002
Posts: 677
Location: Lanham, MD

PostPosted: Wed Nov 05, 2003 7:38 pm    Post subject: Reply with quote

I broke down and created another account. This one has the same problem. It's a fresh account. Never been used. I'm left thinking it is a problem for all regular users. I also unmerge'd and re-merge'd openssh and that had no affect on the issue. (yes I ran etc-update also)
_________________
An Evil Genious' Guide to Sheeple and How To Avoid Becoming One | 0x4C9EF4A
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6837
Location: Blighty

PostPosted: Thu Nov 06, 2003 10:14 am    Post subject: Reply with quote

ask-pass afaik is a virtual program for an X based password entry for ssh
If you're seeing this then you aren't doing anything ssh from a console.

Try emerging gtk2-ssh-askpass
Back to top
View user's profile Send private message
flickerfly
l33t
l33t


Joined: 08 Nov 2002
Posts: 677
Location: Lanham, MD

PostPosted: Thu Nov 06, 2003 1:16 pm    Post subject: Reply with quote

I emerged x11-ask-pass which is equivalent and it made no change in the issue. I've also created the file and chmod'd it 777. This resulted in the error “Host key verification failed.”
_________________
An Evil Genious' Guide to Sheeple and How To Avoid Becoming One | 0x4C9EF4A
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6837
Location: Blighty

PostPosted: Thu Nov 06, 2003 2:26 pm    Post subject: Reply with quote

You need to log out before and login before trying it as it sets an environment variable
Back to top
View user's profile Send private message
flickerfly
l33t
l33t


Joined: 08 Nov 2002
Posts: 677
Location: Lanham, MD

PostPosted: Thu Nov 06, 2003 2:35 pm    Post subject: Reply with quote

*bang* You've figured out a work around for me that I'm glad to have. :D

I'd rather do without this ugly GUI stuff though. I'm quite comfortable with the CLI. Any idea on how to take care of that?
_________________
An Evil Genious' Guide to Sheeple and How To Avoid Becoming One | 0x4C9EF4A
Back to top
View user's profile Send private message
merkaba
n00b
n00b


Joined: 10 Jul 2003
Posts: 56

PostPosted: Wed Dec 24, 2003 1:04 am    Post subject: Reply with quote

has anyone found a *fix* for this?
i've got a similar problem sometime after moving to kernel 2.6 and udev.
root has no problem using ssh and regular terminal windows work fine.
as a regular user ssh -vvv hostname.com ends with:

Code:

debug3: authmethod_lookup password
debug3: remaining preferred:
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
ssh_askpass: exec(/usr/lib/misc/ssh-askpass): No such file or directory
debug1: Calling cleanup 0x8067b14(0x0)
debug3: packet_send2: adding 64 (len 52 padlen 12 extra_pad 64)
debug2: we sent a password packet, wait for reply
Write failed: Broken pipe
debug1: Calling cleanup 0x8067b14(0x0)


as root i get the "root@hostname.com's password:" prompt as expected right after the "debug1: Next authentication method: password" line.
Back to top
View user's profile Send private message
merkaba
n00b
n00b


Joined: 10 Jul 2003
Posts: 56

PostPosted: Wed Dec 24, 2003 4:08 am    Post subject: Reply with quote

found the problem.
this fixed it:
Code:
chmod 660 /dev/tty

had to take a look at the openssh source to understand what was going on.
line 111 of readpass.c does "ttyfd = open(_PATH_TTY, O_RDWR);" and in defines.h "# define _PATH_TTY "/dev/tty".
Back to top
View user's profile Send private message
flickerfly
l33t
l33t


Joined: 08 Nov 2002
Posts: 677
Location: Lanham, MD

PostPosted: Wed Dec 24, 2003 4:20 pm    Post subject: Reply with quote

merkaba wrote:
found the problem.
this fixed it:
Code:
chmod 660 /dev/tty

had to take a look at the openssh source to understand what was going on.
line 111 of readpass.c does "ttyfd = open(_PATH_TTY, O_RDWR);" and in defines.h "# define _PATH_TTY "/dev/tty".


Thanks merkaba!
_________________
An Evil Genious' Guide to Sheeple and How To Avoid Becoming One | 0x4C9EF4A
Back to top
View user's profile Send private message
MKhaos7
n00b
n00b


Joined: 27 Feb 2004
Posts: 3

PostPosted: Fri Feb 27, 2004 12:29 pm    Post subject: Reply with quote

I was having the same problem here. But jsut the

Code:
chmod 660 /dev/tty


dind't solve. But i came up with two solutions:

Code:
 chmod 666 /dev/tty


or, use the 660 and put my user in the tty group.

I'm currently using the second one. Which do you guys thing is the more secure?!
Back to top
View user's profile Send private message
flickerfly
l33t
l33t


Joined: 08 Nov 2002
Posts: 677
Location: Lanham, MD

PostPosted: Fri Feb 27, 2004 2:07 pm    Post subject: Reply with quote

Well, no doubt 666 is less secure simply because it's opening up the world, in addition to owner and group to read and write permissions on something (doesn't matter much what it is). Theoretically you could do 060 as long as everyone that needed console access was in the group (or was root). In practice leaving off the owner could be a bit of a risk, but I would think if it is set to owner of root it would be no big deal. All that to say, if you can get away with 660 than I would just in case. If your owner is set to root the owner settings are somewhat inconsequential, as far as I can tell.
_________________
An Evil Genious' Guide to Sheeple and How To Avoid Becoming One | 0x4C9EF4A
Back to top
View user's profile Send private message
g3n
Guru
Guru


Joined: 13 Dec 2003
Posts: 543
Location: México

PostPosted: Thu Mar 18, 2004 7:51 pm    Post subject: Reply with quote

gtk2-ssh-askpass doesnt create /usr/lib/misc/ssh-askpass
and kdevelop needs it. I had to install x11-ssh-askpass instead
_________________
--[G]--
Back to top
View user's profile Send private message
karnesky
Apprentice
Apprentice


Joined: 18 Mar 2004
Posts: 218

PostPosted: Sat Dec 11, 2004 8:47 pm    Post subject: Reply with quote

g3n wrote:
gtk2-ssh-askpass doesnt create /usr/lib/misc/ssh-askpass
and kdevelop needs it. I had to install x11-ssh-askpass instead
I know this is an old thread, but someone else might benefit from it. You can still use the gtk2 version if you prefer it. Just do a:
Code:
ln /usr/bin/gtk2-ssh-askpass ssh-askpas /usr/lib/misc/ssh-askpass
Back to top
View user's profile Send private message
Chaos
Tux's lil' helper
Tux's lil' helper


Joined: 22 Sep 2002
Posts: 103
Location: NJ

PostPosted: Tue Jan 04, 2005 6:36 am    Post subject: Reply with quote

well everyone seems to have moved on from this one, but I am on another computer and don't like the emerge x11-ssh-askpass fix, so here's the fix if anyone wants it:

for whatever reason openssh can't access /dev/tty anymore so I found the best fix to be
Code:
chown root:users /dev/tty


hopefully this will help someone! :D
Back to top
View user's profile Send private message
justanothergentoofanatic
Guru
Guru


Joined: 29 Feb 2004
Posts: 337

PostPosted: Wed Jan 05, 2005 4:23 am    Post subject: Reply with quote

Won't that allow any user to display anything on any other user's console?

-Mike
Back to top
View user's profile Send private message
Loial
n00b
n00b


Joined: 24 Mar 2003
Posts: 29

PostPosted: Tue Jan 25, 2005 4:23 pm    Post subject: Reply with quote

I'm rather hesitant to change the permissions on /dev/tty
it now says
crw-rw---- 1 root tty 5, 0 Jan 23 18:02 /dev/tty
and i'm not in the tty group
changing permissions or group shouldn't be needed to just use ssh, right?!
btw, I can ssh fine to a machine that grants me acces because my public key is in it's authorized_keys2 file, but when it is not, I get the error about ssh_askpass
Back to top
View user's profile Send private message
nilbus
n00b
n00b


Joined: 19 Jan 2004
Posts: 28
Location: North Carolina State University

PostPosted: Sun Feb 13, 2005 4:07 pm    Post subject: Solved Reply with quote

This soved my problem with the Host Key Verification Failed error:
Code:
chmod 666 /dev/tty /dev/ptmx


On all my other gentoo boxes, these are the permissions those two files had.
Back to top
View user's profile Send private message
nadir-san
Apprentice
Apprentice


Joined: 29 May 2004
Posts: 174
Location: Ireland

PostPosted: Fri Mar 18, 2005 6:31 pm    Post subject: Reply with quote

Code:
chown root:tty /dev/tty


and ur user in the tty group obviously
Back to top
View user's profile Send private message
cazort
Guru
Guru


Joined: 19 Sep 2004
Posts: 343
Location: Lancaster, PA

PostPosted: Wed Mar 29, 2006 4:14 pm    Post subject: Reply with quote

I recently had this problem arise after updating a variety of packages on my system. This thread seems to have been long since dead, but oddly, everything applied here, but with some twists--I was able to get it working by "chmod 666 /dev/tty". However, it didn't work to add my user to the tty group.

I agree this is not a great security thing. It doesn't matter on THIS machine because it's a desktop, but as a matter of principle...I want to know how to do this the "right" way.

Also, this begs the question, WHY THE HECK DID IT BREAK IN THE FIRST PLACE?

I don't do anything radically weird to this system I'm working on...something as fundamental as ssh SHOULD NOT BREAK, under any circumstances. While experienced users like us seemed to figure this out pretty easily...I wouldn't exactly say this would have been a piece of cake for a newbie. Is there any way we could look into this to figure out the actual cause--did some package update change the permissions? Was it a new version of ssh that was the problem? I dunno...something seems worthy of reporting something (not sure what) to bugs.gentoo.org. Just not sure exactly what to say...obviously we were able to "fix" it. But the point is, it should not have broken.
_________________
Alex Zorach | Teacology | RateTea | Why This Way
Back to top
View user's profile Send private message
m4chine
Apprentice
Apprentice


Joined: 12 Mar 2003
Posts: 271
Location: Ventura, CA, USA

PostPosted: Sat Jun 02, 2007 6:16 pm    Post subject: Reply with quote

Chaos wrote:
well everyone seems to have moved on from this one, but I am on another computer and don't like the emerge x11-ssh-askpass fix, so here's the fix if anyone wants it:

for whatever reason openssh can't access /dev/tty anymore so I found the best fix to be
Code:
chown root:users /dev/tty


hopefully this will help someone! :D



Thanks Chaos, this solved it for me. Cheers!
_________________
never trust a man who can count to 1023 on his fingers.

-m4chine
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum