scp files to pfsense system after installation complete but before reboot
-
All,
I have a need to scp file to a pfsense system after the installation process is complete but before the first reboot is done. I have tried the default admin user/pwd's that I can find but I keep getting access denied when trying to scp. telnet access is just fine and I havea hacky way of sending the files in which I split the file into chunks of base64 encoded text and echo the text into a file through telnet but this method is WAY to slow for what I need to send to pfsense now. Could anyone help with the credentials or whatever trick is necessary to get scp access? The default access works AFTER the first reboot (the one that the installer tells you about at the end of the install process). I need to get these files BEFORE I execute that reboot. This is a VERY specific requirement and need so answers of "just do the reboot" are not acceptable.
-
There are some ways to do it but they're all kinda awkward.
What I have done is drop to a shell at the end and then
passwd root
to set the password andifconfig <blah> up
anddhclient <blah>
to pull an address, then you could scp from that shell, or you canvi /etc/ssh/sshd_config
and setPermitRootLogin yes
then save/exit andservice sshd onestart
to let you scp from another host. Doing anything fancier like a static address or have working DNS is also possible but more manual work.tl;dr: Not something you can automate easily (or securely) but for occasional one-off changes it's possible.
-
@jimp I can get the login prompt but I cant seem to figure out the password...the defaults dont work... I basically try this: scp <file> admin@127.0.0.1:4568:/root I have tried with admin user, root, user...I tried using the passwd command to change the password... nothing seems to work... I tried changing the permitrootlogin setting.. I dont need an interface up as I am doing this through the terminal connection...seems like scp should be available as telnet is...
-
@jimp I can get the login prompt but I cant seem to figure out the password...the defaults dont work... I basically try this: scp <file> admin@127.0.0.1:4568:/root I have tried with admin user, root, user...I tried using the passwd command to change the password... nothing seems to work... I tried changing the permitrootlogin setting.. I dont need an interface up as I am doing this through the terminal connection...seems like scp should be available as telnet is...
-
It would be
root
in the installer and notadmin
. If you dopasswd
or maybepasswd root
it should set the password and let to go from there, or it did last I tried it. I haven't tried it lately, but it hasn't been that long ago.