On Tue, 25 Apr 2017 05:39:18 -0500, Walt Farrell wrote:

>On Mon, 24 Apr 2017 21:30:28 -0500, Paul Gilmartin <paulgboul...@aim.com> 
>wrote:
>
>>... so I tried:
>>
>>548 $ sudo cat ~wombat/.ssh/rc
>>/bin/id
>>/bin/uname
>>/bin/date
>>
>>... I see no evidence that the commands in ~wombat/.ssh/rc were executed. ...
>
>You could try adding a command that will leave evidence when it runs. For 
>example, perhaps a "touch" command for a file that doesn't already exist.
>
Indeed.  With a user added as:
    575 $ grep wombat /etc/passwd
    wombat:x:1001:1001:x,x,x,x,x:/home/wombat:/home/wombat/loginshell

... a "ps" in ~wombat/.ssh/rc shows the command:
    sh -c /home/wombat/loginshell -c '/bin/sh .ssh/rc'

I don't understand the purpose of the initial "sh -c".

It's disappointing that ssh can't invoke ~/.ssh/rc in a fashion that allows
environment variables to be propagated to the interactive shell, as login
does with .profile.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to