Displaying 1 result from an estimated 1 matches for "ssh_key_user".
2013 May 21
2
SSH users authentication depending on their public key.
...authorized_keys
and I'm able to manage interactive or non-interactive sessions but I
don't know how to deal with sshfs/sftp use.
Also according to me this is not an elegant solution but I wasn't able
to find on other way until then.
Here is my authorized_keys:
command="sh -c 'SSH_KEY_USER=thomas /tmp/test.sh
${SSH_ORIGINAL_COMMAND:-}'" ssh-rsa publickey thomas at host.domain
Here is the /tmp/test.sh script:
#!/bin/bash
#
set -e
#
if [ ! -z $SSH_TTY ]; then
/bin/bash -l
elif [ ! -z $1 ]; then
$*
fi
exit 0
Do you have any other solutions? Am I missing something ?
U...