can i remote access a running Terminal.app?

i am getting to know how to use the terminal app.


i have 2 macs. 1 macbook and 1 mac mini at home. i like to run a little program through the terminal app that i keep running for long periods of time. i like to remote access the mini and make changes while on the go.


i can acces my mac mini remotely using ssh and i love it. i am wanting to know if there is a way to access the server mac that has a running terminal.app session from a remote mac through ssh. im not sure how do to this or even know what to call it.


im open to using other software


both macs have intel processors running 10.8


thanks in advance

Mac mini, OS X Mountain Lion (10.8.4)

Posted on Aug 12, 2013 5:01 PM

Reply
4 replies

Aug 12, 2013 5:46 PM in response to mrbunn

You need to use a Screen Sharing session to access the existing Terminal window.


Since you have ssh access, you can create an ssh tunnel.


First make sure the remote Mac has System Preferences -> Sharing -> Screen Sharing enabled


ssh -L 22590:localhost:5900 username@remote.mac.connection.address


Now on the local Mac Finder -> Go -> Connect to server -> vnc://localhost:22590


This will start a local Screen Sharing client that connects to your remote Mac over the secure ssh tunnel you just created.


The -L 22590:localhost:5900 establishes an ssh tunnel between the 2 systems. The 22590 (a port number I choose) is the local port number on localhost. The 5900 is the standard VNC port number which the remote Mac's Screen Sharing server will be listening on.


When you specify vnc://localhost:22590, the Finder will connect to the local port 22590 which is the local end of the ssh tunnel. ssh will transfer anything send to 22590 over the secure ssh tunnel to port 5900 on the remote Mac which should be the remote Screen Sharing server.


I use this trick all the time for making remote screen sharing sessions over ssh.


Normally, I would suggest Back-to-My-Mac via iCloud or TeamViewer.com, but since you are already using ssh connections, the ssh tunnel is a logical extension.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

can i remote access a running Terminal.app?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.