Re: setting up keys



Dave <hendedav@xxxxxxxxx> wrote in <46417482-eaa3-4866-b3d4-6d99900ea7d4@xxxxxxxxxxxxxxxxxxxxxxxxxxx>:
On Apr 27, 5:09?pm, Simon Tatham <ana...@xxxxxxxxx> wrote:
Dave ?<hende...@xxxxxxxxx> wrote:
Thanks for the reply Simon, unfortunately that brings up the exact
same password prompt. ?Any other thoughts? ?Config issue? ?Permissions
issue?

The error message before the password prompt ('Warning: Identity file
single_use_identity not accessible: No such file or directory') seems
clear that the problem is that the file isn't being _found_, or at
least isn't being found where you're asking. So I can't see it being a
permissions issue.

So where _is_ the file? You aren't _just_ typing ssh commands, right?
You can look around, with ordinary Unix tools like 'ls', and find out
where the file has gone.

If you can see the file but ssh still doesn't seem to see it, my usual
next step would be strace(1). (That's assuming you're using Linux; if
not, some other Unixes have similar tools by a different name.) Run
that over the ssh client, look for the point at which it tries to open
the key file, and see where _it's_ looking.
--
Simon Tatham ? ? ? ? "The difference between theory and practice is
<ana...@xxxxxxxxx> ? ?that, in theory, there is no difference."


Thanks again for your continued help Simon. I agree with you in your
logic about the file missing. I only mentioned the other types of
potential problems as they were referenced in other posts regarding
that error message.

"So where _is_ the file? You aren't _just_ typing ssh commands,
right?" - No, I'm familiar with GNU/Linux and I've confirmed the file
is in the location being passed from the ssh call. :)

user@server:~$ cd ~
user@server:~$ pwd
/shares
user@server:~$ ls -al
total 260
drwxr-xr-x 5 root share 65536 2011-04-27 16:39 .
drwxr-xr-x 25 root root 4096 2011-04-15 17:01 ..
drwxrwxr-x 2 root share 65536 2011-04-28 09:07 user
drwxrwxr-x 21 root share 65536 2011-04-27 13:52 Public
drwx------ 2 user share 65536 2011-04-27 10:26 .ssh
user@server:~$ ls -al .ssh
total 320
drwx------ 2 user share 65536 2011-04-27 10:26 .
drwxr-xr-x 5 root share 65536 2011-04-27 16:39 ..
-rw------- 1 user share 623 2011-04-27 09:59 authorized_keys
-rw------- 1 root root 623 2011-04-27 10:26 single_use_identity
-rw------- 1 user share 623 2011-04-27 10:03 single_use_identity.pub

NOTE: all the files in the .ssh directory contain the exact same
information (the generated DSA key)


Here's the output from strace also:
stat64(".ssh/single_use_identity", 0xbff086bc) = -1 ENOENT (No such
file or directory)
write(2, "Warning: Identity file .ssh/sing"..., 91Warning: Identity
file .ssh/single_use_identity not accessible: No such file or
directory.

Note the permissions, owner, and group for the files single_use_identity.
If you're not running as root, could these permissions be involved in the
problem? The file does exist, as we can see in the output from ls, but
only root can read it, if I'm reading things correctly.

--
Interestingly, most Unix utilities have a command line option which will
cause the system to rip the user's legs off and beat them to death with the
soggy ends. This is often the default behaviour. -- Bruce Murphy
(shamelessly stolen from a post by Par Leijonhufvud)
.