Jump to content

having issues using ssh keys between servers


Recommended Posts

in the past i used to have the go file  do the mkdir  and chmod and the cat >>authorized keys or what not

then the latest version of unraid told me not to do that anymore in fix common fixes.. and i remmed out all that code

 

and for the longest time it still worked between reboots

 

but now i noticed  with user scripts  the rsync between servers is broken.. when i shell it i have to do the authorization

i thought i should no longer have problems as long as the keys are in the flash's  .ssh folder 

but it doesnt work? 

so what should i do ti get it up and running again with no issues

cuz i didnt understand the documentation  back then  i guess as long as its in the .ssh folder it should just copy over  and import on its own

 

but now it doesnt work and i wish there was a notification to say rysnc userscripts the connection between the servers are broken

 

 

keys 2.PNG

keys.PNG

Link to comment

oh ok i know the Unraid My Servers plugin has caused me issues i forgot to uninstall it as it has made it before you cant boot up  unraid...  and the pluggin has disabled the Tower login..IMG_0444.thumb.JPG.6932de1eb82616686009a299126b51bf.JPG

when you boot into safe mode then what do you do?  ill have to replug in a video card.. its headless   unless i can boot into safe mode from  console?

IMG_0443.thumb.JPG.48582c8f67b5fbdcfcbb9c4704a5685f.JPG

and would removing the unraid plugin fix it

pics are from last week  but i ment to uninstall the plugin 

 

 

ill probably uninstall it later today i not at home at the moment..  

possibly this is the reason?

Link to comment

i just uninstalled the my servers plugin..   and just rebooted  unraid  i need to plug a video card in to be able to change to safe mode

but rebooted unraid it didnt work

 

so once in safe mode? what then how do i fix it?

 

so does that mean any plugin that breaks can break the ssh stuff?  hopefully next release of unraid can fix it so plugins cant break it..

 

is there a certain that plugin that causes the ssh  to fail and not work.. that i can check

 

Edited by comet424
Link to comment
19 hours ago, comet424 said:

so does that mean any plugin that breaks can break the ssh stuff?  hopefully next release of unraid can fix it so plugins cant break it..

 

Plugins can break anything as they have unrestricted access to the system which is the reason that Safe Mode was introduced in the first place to allow users to easily suppress the loading of plugins.   

 

It is also one of the reasons that it is recommended that Docker containers (or VMs) be used where possible as this provides a level of isolation from the core Unraid system.

Link to comment

@JorgeB@itimpi

so then dockers and vms are safer then plugins.. so does that mean the Unraid limetech my servers plugin is considered bad as its not a Docker or a VM?

 

so i booted into safe mode.. i did the gui  no plugins..  it gives me a login.

i used my windows machine and ran the terminal...  went into root/.ssh   folder  and no other things there other then what you see..  i tried to ssh root@backupserver   but asked for that finger print thing and said host failed..

 

i reboot tower.. and i still have no login for the main server..   

but able to access the gui still..

 

so here some pics and a diagnostic..  maybe it can tell you.

but wouldnt your system logs tell you which exact plugin broke unraid.. or broke the SSH built in feature..

i havent had a chance to uninstall some of the plugins  as  i was gonna see if any over lapped any etc

the last 2 photos are from other day.. just before i uninstalled the unraids my server plugin

you can see there also i do not have a login anymore

 

and if some plugins are bad why they on the community apps..   but can you see what plugins i should remove then?

hope it helps

unraid safemode  2.PNG

unraid safemode  3.PNG

unraid safemode.PNG

IMG_0511[1].JPG

IMG_0496[1].JPG

IMG_0497[1].JPG

tower-diagnostics-20210719-1337.zip

Link to comment
51 minutes ago, comet424 said:

so then dockers and vms are safer then plugins.. so does that mean the Unraid limetech my servers plugin is considered bad as its not a Docker or a VM?

There is functionality that can only be implemented as plugins because of the level of access to the system that is required, and it may well be the my servers plugin falls into that category.

Link to comment

@JorgeB i dont know what you talking about "!!RC"

 

i know i asked about ssh keys before  to get the out of the Common Fix Issues  plugin

 

you rem out it all.. and you have all the keys in the .ssh folder and boom bobs your uncle your done.. from what i understood from that other thread.  as the Documentation isnt  detailed enough for joe blow to understand it.. its written in crypted.. as it should say

place your keys  in   "/Flash/config/.ssh"    and thats all you need  Unraid will do the rest 

plain and simple and then show steps how to create the key.. and that you no longer need  chmod  cat any of that in the go file anymore

 

but like i said thats how i read what you guys told me in the other form

delete the go file  for the chmod cat scan thing..  and unraid will do the rest..  and that worked for a while..

i dont think recreating keys will fix the problem of unraid not copying the keys from the .ssh folder into the /root/.ssh/ known hosts file thoguh?

 

 

but that no longer works.. and so if i recreate the keys  it doesnt solve the problem...  does solve it  why its not copying from the USB drive.. and Why you can no longer use the Login on the Server anymore its disabled like you seen..

 

@itimpi

ah ok  well learning stuff new everyday

 

 

 

so i rebooted  back into  unradi safe mode

i get errors booting up  and it hangs alot

but you can see i had to recreate a key   as u see unraid isnt mkaing that known_hosts file

 

also last couple pics are when i reboot the unraid  it hangs

 

and like i mentioned above .. there is no longer a login

 

plus why is there an error for Plugins when it safe mode? its not supposed to be running plugins?

 

 

 

but what i dont understand is.. you guys have the diagnostic file.. why doesn it show step by step  whats loading  and what craps out..  so you can see yup this file caused the corruption or caused the issue?

like file wont load or something.. or reinstall this.. like windows does

or like when you get the blue screen of death.. microsoft knows what caused the crash by minidump.. doesnt unraid have something like that?

 

also can you address why the login is gone.

 

and is there a way to notify you when .ssh failed to copy. and user scripts failed to rsync

unraid safemode  5.PNG

unraid safemode  6.PNG

unraid safemode  7.PNG

unraid safemode 4.PNG

IMG_0515[1].JPG

IMG_0517[1].JPG

IMG_0518[1].JPG

IMG_0519[1].JPG

Edited by comet424
Link to comment

so far 0 luck  

i deleted the /flash/config/ssh/root folder as  i noticed there is a folder in there that used to never be there

so unraid would be forced to load all those keys in the ssh folder..  but it didnt work when i rebooted..  now the /root/.ssh/  folder is empty so i wasnt able to get it to force it in

 

and i was unable to get the login screen back.. what plugin breaks the login?

 

 

 

update: on the ssh part not they login

so i figureed it out which no one told me in my other post..  as no one is step by step detailed

 

you still gotta use the mkdir   you still gotta use chmod keyscan and cat..  but you only have to run it once..  then it saves it.. and unraid takes those saves to the flash so when you reboot all it does is copy that folder..... 

 

if someone would have said all you gotta do is just re run those commands in my go file to import.. i wouldnt spent hours last night reboots  and such..

unraid docs should tell you that too.. when  unraid looses keys folder.. all you gotta do is run  mkdir,cat,keyscan,chmod, to restore it.. so keep a copy of your script..  dont toss it..

 

so least i figured it out trial and error  and figured id try it

 

thanks for the help i appreciate it all

Edited by comet424
Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...