From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Permission denied (publickey,keyboard-interactive).

Hello,

I followed the pointers provided in https://decibel.ni.com/content/docs/DOC-30431 to create an initscript to start my program on system startup for CRIO 9068 Linux RT. the init script does not do anything else other than starting a c++ program on system startup. Once i created the initscript and set the necessary permissions and added the appropriate symbolic links as stated in the link provided above, I rebooted the mechine to see if the initscript works. Fortunately, the script worked fine but somehow i was blocked from logging in.

when i try to login using ssh, i get the error message "Permission denied (publickey,keyboard-interactive)". Moreover, I cannot see the device using NI MAX tool. From other forums, i understood that the problem is related to ~/.ssh/authorized_keys permissions - though I don't understand how creating an initscript could change the permissions of this file.

Any ideas? Has anyone seen anything like this? Now that i have no means to login to the device, what could be a way out?

Thanks

T

0 Kudos
Message 1 of 5
(4,845 Views)

It would be far easier to help you if you post your script. If forced to guess at the issue I'd say that it is probably that you are not running your application in the background. To do that you append an ampersand character to the end of the command in the script that starts your application.

Something like this:

/home/admin/myapp &

Message 2 of 5
(3,854 Views)

As for a way out, use safemode. You can inter safemode by holding the reset button until the status led turns on. Then release it and you'll be in safemode. You can access the flash filesystem under /mnt/userfs to change your script.

Message 3 of 5
(3,854 Views)

Thank you DAQjr,

Indeed "&" did the trick! Everything is working fine now.

Thanks again.

T

0 Kudos
Message 4 of 5
(3,854 Views)

Sorry to be late to the dance, but the much more robust/configurable/desirable method to start an application that does not have implicity daemon-like behavior is to use the start-stop-daemon tool. Simply check the documentation to determine the flags for the type of behavior you want, and instead of launching the program, launch the start-stop-daemon pointing to your program.

For shutdown, if you, e.g., need to save off some data, simply call the start-stop-daemon again to signal your program that things are shutting down.

0 Kudos
Message 5 of 5
(3,854 Views)