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

    PfSense 2.2 Not Accepting sshpass Command

    Installation and Upgrades
    6
    9
    1899
    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.
    • A
      archedraft last edited by

      I have a script I run from a linux box that sends a command to pfSense at various times. With pfSense 2.1.5 I used the command "sshpass -p 'SoMeLetTeRs' ssh sshuser@192.168.1.1" and it logged in fine. Now that I have upgraded to 2.2 the linux box just hangs after I type that command. If I type ssh sshuser@192.168.1.1 it logs in fine once I enter the password. How can I restore this functionality?

      1 Reply Last reply Reply Quote 0
      • Gertjan
        Gertjan last edited by

        Some tips : http://askubuntu.com/questions/282319/how-to-use-sshpass

        No "help me" PM's please. Use the forum.

        1 Reply Last reply Reply Quote 0
        • 0
          06chaynes last edited by

          I am experiencing this exact same issue after the 2.2 update. The article in that link suggests using -oStrictHostKeyChecking=no to fix this issue but even when I specify that option the issue persists. Has anyone had any luck figuring this out?

          1 Reply Last reply Reply Quote 0
          • johnpoz
            johnpoz LAYER 8 Global Moderator last edited by

            wouldn't it be easier to just use public key auth?

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 23.05 | Lab VMs CE 2.6, 2.7

            1 Reply Last reply Reply Quote 0
            • 0
              06chaynes last edited by

              Under normal circumstances i would do just that but not for this scenario. It would be a nightmare for us to manage the keys (this is part of a larger script). We really need to get sshpass working again.

              1 Reply Last reply Reply Quote 0
              • G
                gjaltemba last edited by

                Using -o 'KbdInteractiveDevices no' is a workaround for me on 2.2.2

                "sshpass -p 'SoMeLetTeRs' ssh -o 'KbdInteractiveDevices no' sshuser@192.168.1.1"

                1 Reply Last reply Reply Quote 0
                • 0
                  06chaynes last edited by

                  @gjaltemba:

                  Using -o 'KbdInteractiveDevices no' is a workaround for me on 2.2.2

                  "sshpass -p 'SoMeLetTeRs' ssh -o 'KbdInteractiveDevices no' sshuser@192.168.1.1"

                  Yes! This did in fact fix the issue, thank you!

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

                    It may be a "nightmare" to manage keys but I'd take that any day over hardcoding an ssh password in a script.

                    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
                    • johnpoz
                      johnpoz LAYER 8 Global Moderator last edited by

                      ^ yeah is this script in clear text?  Sounds like bad idea to me ;)

                      An intelligent man is sometimes forced to be drunk to spend time with his fools
                      If you get confused: Listen to the Music Play
                      Please don't Chat/PM me for help, unless mod related
                      SG-4860 23.05 | Lab VMs CE 2.6, 2.7

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post