Run shell command remotely

  • Hi,

    I need to remotely and automatically run a shell command on the pfsense machine; is it possible?
    I was thinking to use plink but i can't pass by the menu that it appears at login via ssh.
    Also I considered using the "Command prompt" option but I can't automatise it.


  • Rebel Alliance Developer Netgate

    When using ssh, login as "root" and not "admin" – you can then bypass the menu and run commands directly.

    ssh from a UNIX system will work, and on Windows plink works too, like so:

    C:\Program Files\PuTTY>plink -ssh -pw pfsense root@ "cat /etc/version"

  • Great! Thanks  :D

Log in to reply