How to start encrypted array from cli?


Recommended Posts

Running 6.5.  I am remote from server and shutdown array from webgui while vpn'ed to server.    Forgot that shuts down docker so got locked out.   SSH'd into server.  rebooted server.   Couple questions

 

How can I start my array from cli?  It is encrypted, so will have to start with password.  Is it a cryptsetup command?

 

How can I start docker containers via cli?

How can I start vm's from cli?   On arch linux I simply did systemctl start [email protected] file.   Is this doable via unraid?

 

Link to comment

I have one server that, although it isn't encrypted, may be an example of a work around for you.

 

You will need:

Dynamic DNS for the router (or know the WAN IP). This can be done in the router (usually).

A local user (other than root) on the server setup with SSH access. (I recommend the SSH and denyhosts plugins by docgyver)

Setup port forwarding on the router to forward SSH to the unRaid server.

 

Using SSH tunnels and port forwarding on the router, I run

ssh [email protected] -CL 8080:localhost:80 -p 2020

from my remote location.

 

Breaking this down:

I have the router forward the external port 2020 to the internal port 22 of the unRaid server's IP.

In the example above, mydynamic.host.com is a Dynamic DNS name of the router so outside machines can talk to the router. It could also be the WAN IP of the router.

'C' tells ssh to use compression (why not).

'L' tells ssh to tunnel the local machines port 8080 to localhost (from the point of view of the unRiad server) on port 80. You would need to change this port to the HTTPS port if you have a SSL cert setup.

 

Once the connection is working, on my computer I open a browser to localhost and port 8080 (https://localhost:8080 if using SSL on the unRaid server.)

 

Then I can start the array as usual in the browser.

 

NB: the localhost you put in the local browser is from the point of view of your machine you are connecting from. I won't go into ssh tunnels here; there's plenty of info about that on the internet.

 

You also may be interested in this video (https://www.youtube.com/watch?v=TSlHEBR1yfY ) showing how to automatically download the password file for the encrypted disks. I haven't tried it.

 

  • Like 1
Link to comment
  • 2 months later...

I am very familiar with tunneling over ssh.  I already have putty setup with this.  Can't figure out how to do via securecrt.  

 

I guess my questoin is.  If I reboot my server remotely.   I don't have the key saved at the moment for obvoius reason.  But I can't wait till I get to server to reboot.  One of my external drives is causing an error which took all my unassigned devices offline.   

 

If I reboot server. I wonder If I can still get to ssh into the server and boot from cli.   

 

Or, I have another computer up on the network.  I can RDP to that computer.  Then start the server that way.  Hmm that should work.

 

 

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.