EFW Support

Support => General Support => Topic started by: derick@replic8.co.bw on Wednesday 27 May 2015, 11:50:16 pm



Title: Enable SSH from CLI
Post by: derick@replic8.co.bw on Wednesday 27 May 2015, 11:50:16 pm
Hi all


Bit stuck. We've got an EFW community server that isn't too healthy. It seems to have some sort of problem with its SSL certificates or something as we cannot access its web console at all. The plan was instead of faffing about trying to fix the SSL issue, to just export its config, get a new server up and running and import the configs over.

Problem though. The sick EFW does not have SSH enabled, and I cannot figure out how to enable it directly from the admin console. This being the case, I have no idea how I'm going to copy over the backed up config without being able to use something like WinSCP...

Is there any way to enable SSH without having access to the web console? I have physical access to the server, but that's not going to help me much in this case.


Title: Re: Enable SSH from CLI
Post by: mmiat on Thursday 28 May 2015, 07:56:21 pm
...


Title: Re: Enable SSH from CLI
Post by: mmiat on Thursday 28 May 2015, 07:59:07 pm
try to change /var/efw/remote/settings:

Code:
ENABLE_SSH_PROTOCOL1=
ENABLE_SSH_PASSWORDS=on
ENABLE_SSH_PORTFW=
submit=Salva
perform_switch=1
__CGI__=CGI=HASH(0x833b0f8)
ENABLE_SSH_KEYS=on
ENABLE_SSH=on

and reboot


Title: Re: Enable SSH from CLI
Post by: mmiat on Thursday 28 May 2015, 08:02:39 pm
argh, I can't edit my post

you don't need to reboot, maybe only start/restart service

or you can use a usb key to save all, I think efw can mount it


Title: Re: Enable SSH from CLI
Post by: derick@replic8.co.bw on Thursday 28 May 2015, 11:30:50 pm
Hi mmiat


Thanks for the help so far, appreciate it :)

I'm going to give your suggestions a go quick, hopefully that does the trick.


Cheers


Title: Re: Enable SSH from CLI
Post by: derick@replic8.co.bw on Friday 29 May 2015, 07:49:30 pm
Just gave this a quick test using a VMWare Workstation VM, no file called /var/efw/remote/settings. It's possible that it might just be my version though, tested the latest EFW Community edition.

The client site uses 2.5.something though, so it might work. Going to try plugging in a USB as well to see if that works.


Title: Re: Enable SSH from CLI
Post by: derick@replic8.co.bw on Saturday 30 May 2015, 12:00:36 am
Thanks mmiat, looks like the config file edit does the trick.

In my case though, I had to create the file from scratch, reboot the server, but then also start SSH by doing /etc/init.d/sshd start.

After that, SSH login works :)


Title: Re: Enable SSH from CLI
Post by: mmiat on Monday 08 June 2015, 11:49:57 pm
well done! ;)