TurboStreetCar Posted October 5, 2021 Share Posted October 5, 2021 Hello, I've been trying to figure this out for a little while now, but it seems with different versions of unraid, the methods of using SSH have changed a few times. the SSH Configuration Tool, that I've seen referenced, doesn't seem to exist anymore, and the help document doesn't get too far into detail on the setup using keys. I'm looking to simply run a command on my remote computer, to either run a script on the command line of my Unraid server, OR trigger a userScript to run, which ever is easier. The situation, is that i have files i would like to be able to sync to my server so i can access them from different computers. Id like to have an icon that will connect to the server and trigger a script that will run rSync. I CAN log into the webGUI and click run, but it would be more convenient to run this by double clicking an icon. I've successfully SSH'd into the server using Putty as well as plink, on command line, HOWEVER i know its generally bad practice to save username and passwords in a bash file, so i would like to use the authentication keys instead. But i cant figure out the current method of generating/using them. Any help would be much appreciated. Thanks, Dan Quote Link to comment
JorgeB Posted October 5, 2021 Share Posted October 5, 2021 If you're on v6.9.x: Generate key: ssh-keygen NOTE: when generating the key use a blank password or it will ask for it anytime you use that key. Add the key to another server's authorized list: cat ~/.ssh/id_rsa.pub | ssh root@remote_host "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys" Quote Link to comment
TurboStreetCar Posted October 10, 2021 Author Share Posted October 10, 2021 On 10/5/2021 at 2:16 PM, JorgeB said: If you're on v6.9.x: Generate key: ssh-keygen NOTE: when generating the key use a blank password or it will ask for it anytime you use that key. Add the key to another server's authorized list: cat ~/.ssh/id_rsa.pub | ssh root@remote_host "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys" Appreciate the reply, Forgive my noobness here. I run the keygen on my remote computer right? Then i run the second command on the unraid terminal? Quote Link to comment
JorgeB Posted October 11, 2021 Share Posted October 11, 2021 11 hours ago, TurboStreetCar said: I run the keygen on my remote computer right? You run both on Unraid, if you want one Unraid server to access another one. Quote Link to comment
TurboStreetCar Posted October 11, 2021 Author Share Posted October 11, 2021 9 hours ago, JorgeB said: You run both on Unraid, if you want one Unraid server to access another one. Got it figured out, Thanks! Was really trying to do some funky stuff cause im OCD with how i want to do things. Ended up using WSL on my windows computers to use Rsync using SSH to sync files. Then ended up writing a windows form application, to run the WSL commands, and display the console text in text boxes. This way i can double click a shortcut, check whether or not i want to do a dry run, and just click start to sync the specific folders i want. Prolly WAY more trouble then it was really worth, but im SUPER pumped to have got it working, So easy now to keep things up to date. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.