1

I am reasonably familiar with the implementation of SSH tunnelling (forward and reverse) for the purpose of creating a secure conduit by which insecure protocols (eg: VNC) can be carried.

On Mac OS, I would like to create a user which will accept an SSH connection but otherwise, zero input. I don't wish to rely on the 3rd party initiator using the -nNT flags.

After searching, I discovered an old thread elsewhere which described how, for a Linux box, a user was added with a shell which accepted no input:

https://ask.slashdot.org/comments.pl?sid=3058711&cid=41049379

The lines of particular interest / significance being:

Set up a user called "sonarman" on my Linux machine. sonarman's shell is a script that loops forever, printing the date and hostname, then sleep 60.

[The 3rd party] can't do any harm to my system, because sonarman's shell doesn't accept any input.

I'd be grateful for any guidance as to whether this (or something that achieves the same objective) is possible for Mac OS or whether this is a *nix-specific feature.

Thanks.

  • What’s your sshd configuration? – Jozef Izso Jun 6 at 7:39
0

you can force a command in the authorized_keys of the user. eg. with :

command="sleep 3600" ssh-rsa AAAAB....XYZ== john@example.com

you could also create a "sonarman-like" script and call it from here instead of the sleep command.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.