-2

I wonder if it is possible to chroot/chdir/process the same unix user differently using the ssh key used in the ssh connexion...

The use case could be a rsync server using only one linux/local user for many virtual account.

It's somewhat how github/gitlab manages users.

EDIT: chrooting is not the main point. The point is to differentiate 'virtual' account using the same *nix user but with different SSH keys. Chrooting is a bonus.

PS: I've cooked a quick POC on a F25 server.

3
  • 1
    thank you for the -1 without even an explanation: coward or pretentious
    – quazardous
    Jan 12, 2017 at 14:47
  • This question might be a duplicate of this one - the first answer looks like it will help. (I didn't downvote btw)
    – James
    Jan 13, 2017 at 23:24
  • No it's not a duplicate of THIS one. But I mislaid things when I spoke about chroot. I'll reformulate.
    – quazardous
    Jan 13, 2017 at 23:27

1 Answer 1

2

I'm not sure if you want different chroots, but the trick is usually to identify the users in authorized_keys. Take this example from Gitolite:

command="/usr/share/gitolite/gl-auth-command john",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa AAAAB3NzaC1yc2EAAAA...

The gl-auth-command then knows who it is, even though everbody signs in with user git.

3

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .