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

    Problem trying to sftp/scp PfSense router

    Scheduled Pinned Locked Moved General pfSense Questions
    4 Posts 2 Posters 15.2k 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.
    • J
      jorge.pelizzoni
      last edited by

      Hi, all!

      First of all, congratulations on the great work you've been doing on
      pfSense! Here is my problem: I've enabled ssh on my pfSense 1.2.2
      router and am able to run ssh sessions on it normally. However, when
      it comes to using sftp and scp I receive the following errors after
      typing the password in:

      (sftp) Received message too long 170535466
      (scp) protocol error: unexpected <newline>By googling around I learnt one possible reason for such errors is
      pfSense might be echoeing anything (e.g. a menu) when logged in, which
      sftp/scp do not expect. So I tried wrapping the whole contents of
      /etc/rc.initial like this:

      if [ ${TERM} = "menu" ]; then
        <original etc="" rc.initial="">fi

      Now, when I try to use sftp/scp (and TERM is obviously != "menu") they do not complain anymore but the connection is closed right away and no desired effect can be observed. Any ideas how to fix this will be most appreciated. Thanks in advance.

      Cheers,

      Jorge.</original></newline>

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

        Try to connect with the username "root" instead of "admin", using the same password.

        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
        • J
          jorge.pelizzoni
          last edited by

          Gosh! Thanks a lot for your reply! Just out of sheer curiosity: how is the difference between admin and root implemented?

          Cheers,

          Jorge.

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

            Glad it helped  :)

            From /etc/passwd:

            root:*:0:0:Charlie &:/root:/bin/sh
            admin:*:0:0:Admin User:/root:/etc/rc.initial
            
            

            Root's shell is /bin/sh and has a .profile that calls /etc/rc.initial, but things like scp can still bypass .profile and execute another command.

            Admin's shell is /etc/rc.initial directly, so it is locked into running that on each login.

            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.