Hello everyone, this is my first post in this section. I hope this question is appropiate.
What I'm doing: Using OpenSSH's remote port forwarding to provide remote assistance to Windows boxes from people I help (you can call them customers if you want). Every now and then, <snip> decides to roll an update that breaks ... random stuff (I unintentionally earn money on this insanity, really).
My question is regarding the server side OpenSSH setup. I have rules like this in my authorized_keys file (I stripped the public key for your viewing convenience):
Code:
no-user-rc,no-agent-forwarding,no-pty,
no-X11-forwarding,permitopen="127.255.255.255:65535",
environment="SSH_SIG=customer_name",
command="env PS1=\"$SSH_SIG\"' \t ' screen -OqxRRS \"$SSH_SIG\" bash -n"
My question is specifically about the bash command:
This allows me to abuse bash and use it for chatting. The '-n' switch (or noexec option) in bash makes bash to not execute anything. Is this safe for using over OpenSSH as a chat mechanism? The weird thing is, this bash command is an interactive session, and the manual of bash states:
Code:
-n Read commands but do not execute them. This may be used to check a
shell script for syntax errors. This is ignored by interactive
shells.
Thanks in advance for any tips or remarks.
P.S. As you might have already figured, looking for google for bash + noexec mostly yields results about the noexec mount flag (ugh)...
Bookmarks