Skip to content. | Skip to navigation

Personal tools

Navigation

You are here: Home / Wiki / Ssh_Mine

Ssh_Mine

SSH to Node

SSH to Node

Clicking "SSH to Node" in the Node Options page will send your browser a "text/x-testbed-ssh" ".tbssh" file.

  • In FreeBSD or Linux, you can save the file and pass it as an argument to ssh-mime.pl or associate it with ssh-mime.pl in your web browser. You can download the ssh-mime.pl Perl program here.
  • In Windows XP or 2000, you have the same choice to save and open the .tbssh file with a script, or associate it with the script in the browser so you can just click. See the installation directions below.
  • For Mac OSX you will need to a use a wrapper around ssh-mime.pl. See the installation directions below. Both xterm and Terminal windows are supported under OSX (if you are not running X11, an OSX Terminal window is created).

Instructions for Linux/FreeBSD:

  • Move the ssh-mime.pl script into a directory of your choice (/usr/local/bin, or ~/bin are two good places.)
  • Set up your browser to handle MIME type "text/x-testbed-ssh" as outlined below.
  • In the Web Interface Node view, click on the "SSH to Node" link.
  • If your browser is properly configured to use ssh-mime.pl, a new xterm window with an ssh session open to your node should emerge.
  • Linux/FreeBSD and Netscape 4.7:
    • Choose preferences from the edit menu.
    • Select Navigator, then Applications under it.
    • Click the New... button.
    • In the MIMEType box, type text/x-testbed-ssh
    • In the Suffixes box, type tbssh
    • Choose Application in the Handled by box
    • Next to Application, either type the path to the ssh-mime.pl script, or use Choose... to find it.
    • Now, be sure to put a space, then %s after the path to the application in the box. This tells netscape to actually pass the control file into ssh-mime.pl (Mozilla does not require this; see below.)
    • Click OK, then OK again.
  • Linux/FreeBSD and Mozilla:
    • Choose preferences from the edit menu.
    • Select Navigator, then Helper Applications under it.
    • Click the New Type... button.
    • In the MIMEType box, type text/x-testbed-ssh
    • In the File extension box, type tbssh
    • For Application to use, either type the path to the ssh-mime.pl script, or use Choose... to find it.
    • In Mozilla do not add a %s.
    • Click OK, then OK again.
  • Linux/FreeBSD and Opera:
    • Choose preferences from the File menu.
    • Select Applications, then File Types under it.
    • Click the New ... button.
    • In the MIMEType box, type text/x-testbed-ssh
    • In the File extension box, type tbssh
    • For Open with other application, either type the path to the ssh-mime.pl script, or use Choose... to find it.
    • In Opera do not add a %s.
    • Click OK, then OK again.

Instructions for Windows:

  • For Windows XP or 2000, you can download the Emulab Perl programs and wrapper programs in a zip file here. It contains {ssh,rdp}-mime-winxp.{c,exe,pl} . The C programs are tiny wrappers which just exec the perl scripts.
  • Software dependencies:
    • The ssh-mime-winxp.pl script uses PuTTY to connect to the Emulab node. PuTTY is available for free download.
    • This all depends on at having least a basic installation of CygWin as well.
    • You can select Perl within CygWin, or install another Perl port.
  • Unpack the Emulab exe's and pl's into an install directory of your choice. The Cygwin bin directory is a good choice, and defaults to C:\cygwin\bin.
  • You can copy putty.exe into that directory as well, or make sure the system path contains the PuTTY install directory.
  • Make sure that the install directory, and also the Perl directory, are on your Windows system path, not just your CygWin shell path. Look in Control Panel / System / Advanced / Environment Variables and double-click on Path in the lower System Variables pane to edit.
  • Windows and Mozilla/Firefox: To associate the handler with the .tbssh file type in Mozilla/Firefox:
    • Click on a node SSH icon in the Node Options page.
    • Go to the Open with line and select Other... from the pull-down list.
    • Browse to the ssh-mime-winxp.exe application you installed above.
    • Once this is working, you can click Do this automatically.
  • Windows and Internet Explorer: To associate the handler with the .tbssh file type in Windows:
    • IE associations come from Windows itself. Until that is set up, IE will just say Unknown file type and offer to save the .tbssh file.
    • You can install the file associations in the registry in one click by downloading and executing this registry file. (Assumes programs installed in C:\cygwin\bin as above.) Otherwise, go through the following steps.
    • Select Save and you will get a Download complete dialog with an Open button. Click it.
    • Click Select the program from a list and OK.
    • Finally, you get an Open with dialog with a Browse... button.
    • Browse to the ssh-mime-winxp.exe application you installed above and click Open.
    • Now you are back on the Open with dialog and ssh-mime-winxp is on the Programs list. You could enter a description of "Emulab SSH connector".
    • Make sure "Always use the selected program to open this kind of file" is on.
  • To avoid having to type a password to PuTTY, set up an SSH Agent key in pageant.

Instructions for Mac OSX:

  • You need to run an ssh-agent that starts up when you initially login. We strongly suggest that you pick up SSHKeychain and install it. The instructions for using SSHKeychain are:
    • Copy SSHKeychain (SSHKeychain.app) to your Applications folder.
    • Run SSHKeychain. This should open a dock item and a statusbar item.
    • Click either the Statusbar Item, the Dock Item, or MainMenu and open the Preferences.
    • Open the Environment tab.
    • Enable Manage global environment variables. This will make SSHKeychain available for other applications.
    • Open the keys tab and see if any of your keys are missing (~/.ssh/id_dsa and ~/.ssh/identity are the default).
    • Add SSHKeychain to your Login Items in the System Preferences. This is located in the Accounts tab in the System Preferences screen.
    • Re-login to make the global variables work.
  • Move the [ssh-mime.pl ssh-mime.pl] script into your ~/bin directory. Also move the `emulab.app` applescript into your ~/bin directory (right click and Save).
  • The first time you click on an SSH To Node button, your browser will ask you what to do. Choose the Open them with this application option, and then Browse for ~/bin/emulab.app. Click OK, and then close the preference panels.