You are not logged in.
To save some time, I know about sshrc...
What I am trying to do is run a script (or file or whatever) after a user is authenticated... This is extremely simple with the use of sshrc, but my users are going to be connecting with the -N argument:
-N Do not execute a remote command. This is useful for just forwarding ports (protocol version 2 only).
When users are connecting with that, my script does not run...
Is there an alternate way to run a script?
By the way... The reason I'm doing this is because I am running a SOCKS server and the users are set to /bin/false.
Offline
You could put it in their .profile, maybe?
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
I do not believe profile would run if their shell is set to /bin/false...
And after testing it, it doesn't run, and it also doesn't run when you use -N...
Maybe I'm using the wrong profile...
I edited /etc/profile.
Offline
Ah now, you're probably right there, sorry. Need to check whether anything does get called - profile.d?
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
profile.d gets the same result...
I tried reading the sshd's source, but I can't seem to find where the -N flag takes effect...
Offline
what problem are you trying to solve? maybe we can do this in another way.
< Daenyth> and he works prolifically
4 8 15 16 23 42
Offline
Well I am trying to run a script after ssh authentication when the client is connecting with the -N flag....
I am hosting a socks proxy server, and I want to prevent simultaneous logins with the same user. The proxy users all have the shell set to /bin/false and their default group set to 'proxy '.
Basically, what I want to do is to disconnect both connections when I detect simultaneous logins...
Offline