Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to mount through sshfs (with osxfuse, former macfuse) a folder on a router. Unfortunately the router doesn't replay directly with a standard command line but requires a couple of commands to invoke it, something like this:

local$ ssh user@router
OpenDG> system
OpenDG> shell

To have it working I would therefore need to send some commands at the very beginning of the ssh session, before changing remote folder and mounting it. Unfortunately, looking at sshfs arguments, I fail to find anything related.

Do you have any idea how to handle this? Help would be greatly appreciated!

share|improve this question

Set up password-less ssh for that router then make a script to send commands via ssh local$ ssh router system and then local$ ssh router shell and then put your sshfs command last.

.ssh/rc is another option.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .