On Mon, 24 Apr 2017 18:44:10 -0500, Bill Godfrey wrote: >>> >>From "man ssh" (on Linux): >> >>NAME >> ssh - OpenSSH SSH client (remote login program) >> >>SYNOPSIS >> ssh [-options] [user@]hostname [command] >> >>DESCRIPTION >> ... >> If command is specified, it is executed on the remote host instead of a >> login shell. >> >>Note "instead of", providing a circumvention. >> > >What actually happens is that the account's shell is executed with arguments >"-c" and the command text, >which means the account's shell is not running as a "login shell". >I'm speaking of Linux. I haven't worked with ssh/sshd on z/OS. > Empirically, I confirm that. The man page omits mentioning "the account's shell".
FILES ... ~/.ssh/rc Commands in this file are executed by ssh when the user logs in, just before the user's shell (or command) is started. See the sshd(8) manual page for more information. ... so I tried: 546 $ grep wombat /etc/passwd wombat:x:1001:1001:x,x,x,x,x:/home/wombat:/usr/lib/openssh/sftp-server 547 $ 547 $ sudo ls -al ~wombat/.ssh total 12 drwx------ 2 wombat wombat 4096 Apr 24 18:38 . drwxr-xr-x 3 wombat wombat 4096 Apr 24 18:35 .. -rwx------ 1 wombat wombat 29 Apr 24 18:43 rc 548 $ 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. I can't tell exactly what happened. Nor does the man page tell what processor executes the commands in ~/.ssh/.rc "before the user's shell is started." It seems a contradiction to expect the user's shell to execute a script before it is started. -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN