https://bugzilla.mindrot.org/show_bug.cgi?id=3048

            Bug ID: 3048
           Summary: ssh reads from the wrong directory in user namespace
           Product: Portable OpenSSH
           Version: 7.9p1
          Hardware: amd64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: ssh
          Assignee: [email protected]
          Reporter: [email protected]

ssh(1) says that

     -i identity_file
             Selects a file from which the identity (private key) for
public key authentication is read.  The default is ~/.ssh/id_dsa,
             ~/.ssh/id_ecdsa, ~/.ssh/id_ed25519 and ~/.ssh/id_rsa. 
Identity files may also be specified on a per-host basis in the con‐
             figuration file.  It is possible to have multiple -i
options (and multiple identities specified in configuration files).
             If no certificates have been explicitly specified by the
CertificateFile directive, ssh will also try to load certificate
             information from the filename obtained by appending
-cert.pub to identity filenames.

but it seems it does something else

holst@hholst-lt:~$ unshare -r
root@hholst-lt:~# echo "~ expands to" ~ "and \$HOME is" $HOME
~ expands to /home/holst and $HOME is /home/holst
root@hholst-lt:~# ssh sdf.org
Could not create directory '/root/.ssh'.
load pubkey "/root/.ssh/id_rsa": Permission denied
load pubkey "/root/.ssh/id_rsa": Permission denied
load pubkey "/root/.ssh/id_dsa": Permission denied
load pubkey "/root/.ssh/id_dsa": Permission denied
load pubkey "/root/.ssh/id_ecdsa": Permission denied
load pubkey "/root/.ssh/id_ecdsa": Permission denied
load pubkey "/root/.ssh/id_ed25519": Permission denied
load pubkey "/root/.ssh/id_ed25519": Permission denied
load pubkey "/root/.ssh/id_xmss": Permission denied
load pubkey "/root/.ssh/id_xmss": Permission denied
The authenticity of host 'sdf.org (205.166.94.16)' can't be
established.
ED25519 key fingerprint is
SHA256:ZjwbO7AU8rHJExYrmZS2LqGZ7WfdoELfMrF54W92PYA.
Are you sure you want to continue connecting (yes/no)? n
Please type 'yes' or 'no': no
Host key verification failed.
root@hholst-lt:~#

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
openssh-bugs mailing list
[email protected]
https://lists.mindrot.org/mailman/listinfo/openssh-bugs

Reply via email to