Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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'm ssh'ed into a machine and logged in as a different user. Is it possible to open a few new windows that will still be ssh'ed into that same machine, still logged in as that user?

share|improve this question
Which OS is the local machine and which terminal software are you using? On Windows, using PuTTY, I click the system menu and select Duplicate Session. – Dennis Williamson Sep 21 '10 at 16:48
@Ross: Yes, I started answering this assuming you were SSHing from OS X to linux, but I just realized I might have that backwards. – Josh Sep 21 '10 at 16:51
In your first window you could start GNU Screen and then start as many different things as you want within screen. – Zoredache Sep 21 '10 at 17:08
excellent, Josh assumed ssh to linux, Nifle assumed ssh to Mac. Either way, problem solved B-) – Brian Postow Sep 21 '10 at 17:14
@Ross: Check out some hidden features of screen -- it's a great program! – Josh Sep 21 '10 at 18:28

Please note, this answer assumes your local machine is OS X, which you didn't specify...

You could set up a Terminal command to do this. From the Terminal menu, choose Preferences.... On the "Settings" tab, either create a new settingh group using the + button, or duplicate one of the setting groups you like. On the "Shell" group of your new settings, enter as the command: ssh user@host, where user and host are real values. Check the "Run inside shell" box.

OS X Terminal Preferences

Now, you can open new windows or tabs by choosing the menu options Shell > New Window > Your setting name or Shell > New Tab > Your setting name.

EDIT: I see you're interested in screen. This is a great program, and I use in all the time. In fact the screenshot above is outdated. What I now have is the one above it, called "Resume Screen". The command for that one is:

ssh -t user@host screen -RR -DD

This will connect to host as user and resume the last screen you were using (detaching it if you're still attached elsewhere). Similar means of setting up a terminal exist on linux. For gnome-terminal, check Edit > Profiles.

share|improve this answer

The easiest way would be to have a local x-server and enable(*) ssh X forwarding. That way you could start any app (including a terminal) remotely and have it displayed locally.

(*) I believe it's turned on by default on most command line ssh clients

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .