snap and ssh

Didier Roche didrocks at ubuntu.com
Wed Nov 23 13:29:12 UTC 2016


Le 23/11/2016 à 14:14, Vasilisc a écrit :
> Please give me advice. I want use openssh-client in snap package.
> But ssh try read system path
>
> vasilisc at vb:/home/vasilisc$ echo $HOME
> /home/vasilisc/snap/pac/x1
>
> vasilisc at vb:/home/vasilisc$ echo $SNAP_USER_DATA
> /home/vasilisc/snap/pac/x1
>
> vasilisc at vb:/home/vasilisc$ ssh vasilisc at 192.168.3.6
> The authenticity of host '192.168.3.6 (192.168.3.6)' can't be
> established.
> ECDSA key fingerprint is
> SHA256:hfV+C1ZOuysKlslXmj1bBKr6OaDKphmMN8KCbwcDlug.
> Are you sure you want to continue connecting (yes/no)? yes
> Failed to add the host to the list of known hosts
> (/home/vasilisc/.ssh/known_hosts).
> Load key "/home/vasilisc/.ssh/id_rsa": Permission denied
>
> How to make the ssh-client use the correct path?
>
Hey Vasilisc,

It seems then that ssh is using hardcoded paths like /home/$USER/.ssh
for looking by default to id_rsa file and not using $HOME. Multiple ways
to get that fixed:
* reading the openssh-client code and fix it to use $HOME (and so, it
will use your snap $HOME)
* use ssh -i (look at the manpage for ssh) to point to an identity file
directly

Cheers,
Didier





More information about the Snapcraft mailing list