klintkrossa
Posts: 81
Joined: Tue Nov 10, 2015 3:06 pm

Am I asking the wrong Question?

Tue Nov 10, 2015 3:28 pm

Am I asking the wrong Question?

Hello

I like to run the RPI headless. I would like to make it a single program available for SSH login. The program is a python-script so if they/I control-c it then they/I could have access to the rest of my RPI. I would have an additional user that I could SSH into.

So how to make a RPI SSH login, only run a single program?

Klint
Thanks
This is not like any other bulletin boards that I have been on. Been flamed on other BB's so bad I was afraid to ask.

All my Raspberry Pi's are like the Hessian artilleryman of Sleepy Hollow.

User avatar
ukscone
Forum Moderator
Forum Moderator
Posts: 4121
Joined: Fri Jul 29, 2011 2:51 pm
Contact: Website

Re: Am I asking the wrong Question?

Tue Nov 10, 2015 4:04 pm

See the ticked answer to this question on serverfault http://serverfault.com/questions/300183 ... -using-ssh

User avatar
RaTTuS
Posts: 10415
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Am I asking the wrong Question?

Tue Nov 10, 2015 4:04 pm

probably
sudo adduser newname
login to newname
add to .bashrc so right at the end it runs your program [it may be empty on your system]
you can have it in .bash_profile also - that will then run it on virtual terminals
exit out
ssh in

[edit]
I probably miss understood that you don't want the user to be able to run anything else if so then the serverfault one is the way to do it
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

klintkrossa
Posts: 81
Joined: Tue Nov 10, 2015 3:06 pm

Re: Am I asking the wrong Question?

Tue Nov 10, 2015 6:00 pm

thanks
Thanks
This is not like any other bulletin boards that I have been on. Been flamed on other BB's so bad I was afraid to ask.

All my Raspberry Pi's are like the Hessian artilleryman of Sleepy Hollow.

Return to “Advanced users”