Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
Password:
OpenDG> system
OpenDG> shell
remote$

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

1 Answer 1

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

 
discard

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.