tmchow Posted August 8, 2016 Share Posted August 8, 2016 I'd like to see an example of a /boot/config/go file calling into custom scripts so I know the calling syntax to make sure I'm doing it right. (I'm trying to call a custom script to setup my SSH keys which keep getting blown away after reboot). I've tried searching but oddly can't seem to find obvious example. Thanks! Link to comment
saarg Posted August 8, 2016 Share Posted August 8, 2016 If your ssh keys are deleted when you boot, you have a problem. They should be saved in /boot/config/ssh. You might want to check your USB for corruption. Add the diagnostics so we can see what is going on. Link to comment
tmchow Posted August 8, 2016 Author Share Posted August 8, 2016 If your ssh keys are deleted when you boot, you have a problem. They should be saved in /boot/config/ssh. You might want to check your USB for corruption. Add the diagnostics so we can see what is going on. They weren't stores in /boot anywhere originally. The issue is I want to have my /root/.ssh/authorized_keys file set every time on reboot so I can ssh in without a Pwd at home. My plan was to put the file in /boot/config/ssh/ and make a go file script to copy it to /root/.ssh/. Sent from my iPhone using Tapatalk Link to comment
saarg Posted August 8, 2016 Share Posted August 8, 2016 If your ssh keys are deleted when you boot, you have a problem. They should be saved in /boot/config/ssh. You might want to check your USB for corruption. Add the diagnostics so we can see what is going on. They were stores in /boot anywhere. The issue is I want to have my /root/.ssh/authorized_keys file set every time on reboot so I can ssh in without a Pwd at home. My plan was to put the file in /boot/config/ssh/ and make a go file script to copy it to /root/.ssh/. Sent from my iPhone using Tapatalk Then you just make a folder on the flash drive, then add a command to the go file to copy the keys to the folder you need and that's it. The go file is just a bash script file, so you just add the commands you use on the command line to the go script. Link to comment
ken-ji Posted August 8, 2016 Share Posted August 8, 2016 It'll be a lot easier to just do this: # edit /boot/config/ssh/sshd_config Look for AuthorizedKeysFile change it to be like: AuthorizedKeysFile /etc/ssh/%u.pubkeys # Save your public keys as /etc/ssh/root.pubkeys (and) /boot/config/ssh/root.pubkeys That will take care of the problem once you have rebooted or restarted the SSH service with /etc/rc.d/rc.sshd restart of course if you need to install private keys, you could also edit /etc/ssh/ssh_config Host * IdentityFile /etc/ssh/root.key and save the private keys to: /etc/ssh/root.keys (and) /boot/config/ssh/root.keys Link to comment
tmchow Posted August 9, 2016 Author Share Posted August 9, 2016 It'll be a lot easier to just do this: # edit /boot/config/ssh/sshd_config Look for AuthorizedKeysFile change it to be like: AuthorizedKeysFile /etc/ssh/%u.pubkeys # Save your public keys as /etc/ssh/root.pubkeys (and) /boot/config/ssh/root.pubkeys That will take care of the problem once you have rebooted or restarted the SSH service with /etc/rc.d/rc.sshd restart of course if you need to install private keys, you could also edit /etc/ssh/ssh_config Host * IdentityFile /etc/ssh/root.key and save the private keys to: /etc/ssh/root.keys (and) /boot/config/ssh/root.keys Is the /boot/config/ssh/sshd_config file supposed to already exist? I don't have that file anywhere. Link to comment
ken-ji Posted August 9, 2016 Share Posted August 9, 2016 Oops. I've had the customizations since 6.0b14... if its not there get the original copy from /etc/ssh/ssh_config When sshd starts up, the files in /boot/config/ssh gets copied over to /etc/ssh so files in /boot/config/ssh override the stock versions in /etc/ssh Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.