noobient / noobuntu

Enterprise Ubuntu development environment with Active Directory integration
MIT License
6 stars 3 forks source link

Reconsider SSH #21

Closed bviktor closed 4 years ago

bviktor commented 4 years ago

Is Pageant really worth it? Troublesome to set up. Also Nautilus SFTP mounts don't work with it (yet?).

sftp://<user>@<host>[:<port>]/<path>

On the filesystem:

"${XDG_RUNTIME_DIR}/gvfs/sftp:host=<host>,port=<port>,user=<user>"
bviktor commented 4 years ago

https://superuser.com/questions/1469886/home-directories-via-sshfs-and-pam-mount https://askubuntu.com/questions/975818/how-do-i-specify-ssh-options-for-sshfs

bviktor commented 4 years ago

Working entry:

<volume user="*" mountpoint="/media/%(USER)/foobar" path="sshfs#bviktor@foobar.com:/home/bviktor" options="port=922" fstype="fuse" />

But file permissions are weird.

Edit: permissions:

https://serverfault.com/questions/633527/wrong-owner-group-with-sshfs

bviktor commented 4 years ago

https://superuser.com/questions/141036/use-of-gnome-keyring-daemon-without-x

bviktor commented 4 years ago

Pam method doesn't seem to work, but it won't work with keypair auth anyway.

Make a script that

bviktor commented 4 years ago

https://stackoverflow.com/questions/8536732/can-i-hold-git-credentials-in-environment-variables

bviktor commented 4 years ago

Dunno how to pass things to different credential helpers, so let's just use 'cache' unless otherwise.

bviktor commented 4 years ago

pam_mount doesn't seem to work with passphrase-protected keys.

https://unix.stackexchange.com/questions/94720/connection-reset-by-peer-using-sshfs https://unix.stackexchange.com/questions/318246/how-to-set-up-gnome-keyring-for-passwordless-ssh-sshfs-using-the-keyring-to-unlo https://unix.stackexchange.com/questions/108899/storing-the-private-key-password-for-auto-mounting-sshfs/108907 https://askubuntu.com/questions/704398/use-sshfs-with-ssh-agent-and-or-kwallet

bviktor commented 4 years ago

It actually works, but only after a manual pam_remount. Most likely gnome-keyring is unavailable when pam_mount tries to open these. Tried to add the gnome-keyring so to various files under /etc/pam.d but to no avail, I just broke even more things. Maybe someday.

In any case, things do work now.