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: 

NI Linux Real-Time OS ssh public key access

Solved!
Go to solution

I'm brand new to NI and this community forum, so I apologize in advance for breaking forum "protocol" and hope this is the right place to ask this question.

 

I'm no stranger to the Linux operating system, but this is the first time I've used the "NI Linux Real-Time OS". I currently have a hard drive connected to my cRIO which is found under "/media/sda1/". There I have a folder called "data_exchange", which I'm trying to "scp" a file from my Windows machine on the same network. On my Windows machine, I issue the following command

 

scp test.txt admin@192.168.1.5:/media/sda1/

 

It then asks me for the "admin" password. This is fine and if I provide it, it copies the file as expected. I want to be able to do this without having to issue the password.

 

On the cRIO, I created an RSA public key using "ssh-keygen" and the files are stored under "/home/admin/.ssh" as expected. When I was prompted for a password, I left it blank, so I could ssh/scp without the need of providing a password.

 

On my Windows machine, I copied the public key from the cRIO to "C:\Users\chorizo\.ssh\authorized_keys".

 

This should be enough to allow me to ssh/scp in without having to provide a password. However, when I try to ssh/scp, it always asks me "Log in with your NI-Auth credentials.". Can someone help me identify what I'm missing? Why does it continue to ask me for a password?

 

 

0 Kudos
Message 1 of 2
(1,364 Views)
Solution
Accepted by NWAVE

You should be creating the ssh key on the windows machine.

 

then use the ssh-copy-id command from Windows to install the key on the linux machine.

 

You just got it backwards.

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
0 Kudos
Message 2 of 2
(1,360 Views)