driving me mental, remote login to pfsense CLI to shutdown
-
@automate said in driving me mental, remote login to pfsense CLI to shutdown:
/var/lib/openhab2/.ssh/id_ed25519
Looks like it doesnt like loading it from that directory
debug2: input_userauth_pk_ok: fp SHA256:2QxvQbZibZUUeRI7j5DwP3LaeCIvPDWJDSrcLw7UX2k
debug3: sign_and_send_pubkey: ED25519 SHA256:2QxvQbZibZUUeRI7j5DwP3LaeCIvPDWJDSrcLw7UX2k
Load key "/var/lib/openhab2/.ssh/id_ed25519": Permission denied -
What are the permissions on the file? Why are you trying to use a different user and then another user to auth with?
-
The linux server has software on it called openhab. That software executes its scripts, or rules, using the openhab user. This is a home automation package.
So, the openhab user executes the command but logs in with 'nsautomate'
nsautomate@ihp:~$ sudo ls -la /var/lib/openhab2/.ssh/id_ed25519 -rw------- 1 root root 411 Aug 5 10:39 /var/lib/openhab2/.ssh/id_ed25519 nsautomate@ihp:~$
-
that seems pointless.. if the user account openhab is going to run the command, just create that user on pfsense and use it to auth with and run the halt cmd.
Only root can access that file, per the permissions on it.
-
Cool, that appears to have worked. However, its shut down pfsense but not powered off the unit, like it does if you select 'halt' from the GUI. I can still ping it but not SSH to it and its still forwarding packets despite a CLI message saying its being shut down??
Is there an alternate command that shuts the whole system down gracefully?
-
What kind of hardware?
You probably want
shutdown -p now
https://www.freebsd.org/cgi/man.cgi?query=shutdown&manpath=FreeBSD+11.2-RELEASE
-
He has something running on linux that he wants to ssh into pfsense using public key auth and run the rc.halt
Which works just fine I have tested your old thread, on a VM running 2.4.4p3 - takes all of 30 seconds to setup.
He is having a problem using public key auth in general.
-
Sounds like he got it working but didn't get a power off.
/etc/rc.halt
is probably a better option. -
@Derelict it's intel i5 hardware. I'll try that option
-
Thanks, etc/rc.halt does the trick
-
@johnpoz said in driving me mental, remote login to pfsense CLI to shutdown:
ssh-keygen -o -t ed25519
Thanks John & Derelict! all working now :)