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

    Accessing log files with lnav via ssh

    Scheduled Pinned Locked Moved General pfSense Questions
    5 Posts 2 Posters 325 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.
    • A
      axavosteria
      last edited by

      I'm trying to view the files of my pfsense from another pc with lnav. Unfortunately this is not working, in the log files I can see that sshguard is blocking it with the following message:

      Attack from "192.168.100.10" on service SSH with danger 2
      

      I can:

      • ssh into pfsense with my key
      • scp (with key) to and from pfsense

      How can I get sshguard not to block my lnav requests? Thanks in advance for any help!

      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        That log only indicates an authentication failure on SSH not that sshguard is actually blocking anything yet. It will start blocking after repeated auth failures.

        The Inav client is using a bad key.

        Steve

        A 1 Reply Last reply Reply Quote 0
        • A
          axavosteria @stephenw10
          last edited by

          @stephenw10 said in Accessing log files with lnav via ssh:

          The Inav client is using a bad key.

          Thanks for the hint, I made some progress ;-) :

          AFAIK it is not possible to specify a ssh key in lnav directly. I was able to pass the key by adding the host to my .ssh/config file and now I can access pfsense via lnav, viewing of log files still doesn't work though.

          I guess this is a lnav issue now?! no files are opened, only in the lnav debug log I can see

          reporting error: pfsense: -- /bin/sh: bash: not found
          

          In the pfsense log I see repetitive:

          Accepted publickey for admin from 192.168.100.10 port 43816 ssh2: RSA SHA256:xxx
          Received disconnect from 192.168.100.10 port 43816:11: disconnected by user
          Disconnected from user admin 192.168.100.10 port 43816
          
          1 Reply Last reply Reply Quote 0
          • stephenw10S
            stephenw10 Netgate Administrator
            last edited by

            pfSense does not include bash by default. It uses sh or tcsh. You can install bash if you can't change the ssh command Inav is sending. However it's not a gui package so it may be lost across an upgrade.

            A 1 Reply Last reply Reply Quote 0
            • A
              axavosteria @stephenw10
              last edited by

              @stephenw10

              Thanks again!
              I was able to change the config of lnav, so that it uses sh instead of bash. Now it is working!

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