Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    scp files to pfsense system after installation complete but before reboot

    Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
    5 Posts 2 Posters 902 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mephmanx
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        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 and ifconfig <blah> up and dhclient <blah> to pull an address, then you could scp from that shell, or you can vi /etc/ssh/sshd_config and set PermitRootLogin yes then save/exit and service 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.

        Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        M 1 Reply Last reply Reply Quote 0
        • M
          mephmanx
          last edited by

          @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...
          
          1 Reply Last reply Reply Quote 0
          • M
            mephmanx @jimp
            last edited by

            @jimp

            @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...
            
            1 Reply Last reply Reply Quote 0
            • jimpJ
              jimp Rebel Alliance Developer Netgate
              last edited by

              It would be root in the installer and not admin. If you do passwd or maybe passwd 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.

              Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

              Need help fast? Netgate Global Support!

              Do not Chat/PM for help!

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.