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.

Is there a relatively simple way to start a new terminal (ideally within a new window) within a pre-existing SSH terminal?

As in:

chuck@mycomputer:~$ ssh myserver
Enter passphrase for key '/home/chuck/.ssh/id_rsa': 
Linux 2.6 SMP Tue Jul 17 11:13:12 EDT 2007 i686
chuck@myserver:~$

[insert magic here]

[ ...a new gnome-terminal (or the like) appears with chuck@myserver:~$ ]

I'm not interested in using X11 forwarding. I feel like putty supports this... but haven't a windows machine around to check with.

share|improve this question
    
As an alternative to a new window, I would recommend the excellent GNU screen -- it has the massive advantage that it survives a severed connection and can be resumed from anywhere at any time. –  Kerrek SB Jun 29 '11 at 22:35
    
Screen is exactly what I needed, thanks! –  Chuck Aug 21 '11 at 16:50
    
awesome. I think screen has one of the largest need-vs-known ration :-) Once you get hooked, it's hard to imagine a life before screen... –  Kerrek SB Aug 21 '11 at 16:52

2 Answers 2

up vote 4 down vote accepted

Yes. Add this to your ~/.ssh/config:

ControlMaster auto
ControlPath ~/.ssh/sock_%r@%h:%p

I believe this will do what you want... if not, please clarify your question. :)

share|improve this answer
    
I guess the duplication of connections is really part of what I'm trying to avoid here. I was looking for multiple terminals over one connection. (GNU Screen did it) –  Chuck Aug 21 '11 at 16:49
1  
That's exactly what my suggestion does--multiple terminals over a single connection. Although screen is also a good answer. My solution has the advantage of letting other non-terminal connections go over the same connection as well--such as rsync, scp, etc. I use both ssh's control master feature and screen all day long, every day of the year. –  Flimzy Aug 21 '11 at 17:02

GNU Screen gives me pretty much exactly what I wanted: Screen User's Manual

share|improve this answer
1  
you sidestepped the question :) –  akira Aug 21 '11 at 16:59

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.