I recently was introduced to a command that will ssh in our proxy server, then ssh into a network:

ssh myname@proxy -t "host $IP"

I tried modifying the command as follows to run MTR against our SIP server:

ssh mtname@proxy -t screen -dmS sip mtr oursip.server

As soon as the command finishes, it seems to disconnect and screen -list shows nothing.

I also tried ssh mtname@proxy -t mtr oursip.server and it worked, but as soon as I pressed Control-C the SSH session ended.

The fundamental problem is that I am new to working at the command line and I really have no idea what I'm doing. Is there a sensible way to accomplish what I am trying to do?

  • And what are you trying to do? To got a persistent connection? – Kondybas Dec 4 '15 at 7:59

I've never managed to get this kind of thing to work as you hope. If you search the internet there don't appear to be any solutions either. The best I've managed is to not use -d and to manually detach

ssh root@example.com -t screen -S Sip -m "mtr sip.example.com"

then manually detach Ctrl-ad.

  • Thank you, i believe that is going to be the best solution as well, i was hoping to get it to work in detached mode – Isaac Harris Dec 6 '15 at 17:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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