Sounds like a promising lead.
It may be as simple as copying your ~/.ssh/known_hosts file to the home directory of the user running the APC software.
no, it does not work for me..
but finally i found the solution, only with ssh, without putty neither plink, after reading this post:http://forum.pfsense.org/index.php/topic,11356.msg62849.html#msg62849
here the howto:
Purpose: remote shutdown the firewall via ssh
Solution: ssh ssh-keygen
ssh, shell (for both firewall + client), webGUI
firewall pfsense 1.2.2 (192.168.1.1)
APC Powerchute on Ubuntu Server 8.04 lts (192.168.1.9)
security hole due to NON-password private RSA key
Step 1: prepare non-password RSA key ==> for automatic proccess
a. from client, with administrative privileges use ssh-keygen to generate private/public key 'pfsense' without password
b. verify on client the private key is into => ~/.ssh/pfsense
c. put the public key pfsense.pub to firewall => /root/.ssh/authorized_keys (you can use webGUI to update the key)
Step 2: empty the file .profile on pfsense
a. ssh login to the firewall / webGUI Diagnostics - Execute Shell command
to empty the file .profile
echo '' > /root/.profile
This step is required, so that we can use script from client. If you do not do this, the shell is INTERACTIVE and scripts from client cannot run
Step 3: from ubuntu client, as root run code
ssh -p 220 -v root@pfsense
answering yes to accept key exchange (only at first connetion)
Step 4: insert code ssh -p 220 root@pfsense "/sbin/shutdown -p now"
in the script /opt/APC/PowerChuteBusinessEdition/Agent/cmdfiles/sd.sh that APC Powerchute runs at power supply down
Step 5: verify pfsense firewall shutdown correctly on ups power down
Hope to be clear,
special thanks to:
- Rocky, for the clear guide to rsync backup on pfsense,
- Jimp, for the collaboration (-p option..)
but i belief that Cry Havok' solution (NUT use) could be better: i'll try later.