Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.