0

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?

8
  • 3
    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. Sep 21, 2010 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, 2010 at 16:51
  • 1
    In your first window you could start GNU Screen and then start as many different things as you want within screen.
    – Zoredache
    Sep 21, 2010 at 17:08
  • 1
    excellent, Josh assumed ssh to linux, Nifle assumed ssh to Mac. Either way, problem solved B-) Sep 21, 2010 at 17:14
  • 1
    @Ross: Check out some hidden features of screen -- it's a great program!
    – Josh
    Sep 21, 2010 at 18:28

2 Answers 2

1

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.

0

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

You must log in to answer this question.

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