Re: Restricted shell and ssh problem

2016-08-25 Thread Stefan Johnson
I don't know for sure, but my best guess is that you need to look at using
a profile to set ENV to include an appropriate TMPDIR (if necessary) as
well as to kick off the ssh-agent process.

>From the man page for rksh/ksh:

*-r* Restricted shell. A shell is “restricted” if this option is used; if
the basename the shell was invoked with was “rksh”; or if the SHELL
parameter is set to “rksh”. The following restrictions come into effect
after the shell processes any profile and ENV files:

   - The *cd* command is disabled.
   - The SHELL, ENV, and PATH parameters cannot be changed.
   - Command names can't be specified with absolute or relative paths.
   - The *-p* option of the built-in command *command* can't be used.
   - Redirections that create files can't be used (i.e. ‘>’, ‘>|’,
‘>>’, ‘<>
   ’).

And from the man page for ssh-agent:
FILES *$TMPDIR/ssh-XX/agent.* UNIX-domain sockets used to
contain the connection to the authentication agent. These sockets should
only be readable by the owner. The sockets should get automatically removed
when the agent exits.

Hope this helped.



Re: Restricted shell and ssh problem

2016-08-25 Thread jean-yves boisiaud
found the probleM.

I Forgot to set ForwardAgent in the 1st ssh command.

Sorry.

2016-08-25 18:45 GMT+02:00 jean-yves boisiaud <
jean-yves.boisi...@alcor-consulting.fr>:

> Hello,
>
> I am running openbsd 5.7 and openssh 6.8.
>
> I set a restricted shell (rksh) to run only ssh. It works.
>
> In the restricted shell command directory, I added also links to command
> ssh-agent and ssh-add.
>
> But, SSH_AUTH_SOCK is not set (and /tmp/ssh- does not exist), so I
> must use password authentication.
>
> How could I use agent authentication with ssh when I am in a restricted
> shell ?
>
> ​Thanks for your help.​
>
> --
> Jean-Yves Boisiaud - Alcor Consulting
> 24, rue de la Glycine
> 49250 Saint Remy la Varenne
> mobile : +33 6 63 71 73 46  fixe : +33 9 72 41 19 35
>



--
Jean-Yves Boisiaud - Alcor Consulting
24, rue de la Glycine
49250 Saint Remy la Varenne
mobile : +33 6 63 71 73 46  fixe : +33 9 72 41 19 35