-2

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?

Skyhawk
  • 14,200
  • 4
  • 53
  • 95

1 Answers1

0

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.

user9517
  • 115,471
  • 20
  • 215
  • 297
  • 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 06 '15 at 17:52