- How do I configure SSH2 in MacSSH ?
- How do I setup Applescript for MacSSH ?
- How do I use my Public Key with OpenSSH ?
- How do I setup CVS in MacSSH ?
- The connection fails with message "do_zlib: inflate() failed: unknown compression method"
- The connection dies without any error message
- When I open a second forwarded session on the same local port, MacSSH displays "lsh: Invalid argument, (errno = 22)"
- It is sloooow, can't you do anything to make it faster ?
- I've changed the Terminal colors to white on black, but the bold text is still displayed in black.
- How can I use different key-pairs for different hosts ?
- I need to forward many different ports from the same SSH2 server. Is there an easier way than using many favorites ?
- How do I forward X11 sessions with MacSSH ?
- Why can't I kerberize after MacSSH has been running for a day ?
- Why can't I see accented characters, even though I selected ISO-8859-1 as translation ?
- Will you add SSH1 support ?
- Will you add SFTP (SCP) support ?
- Will you make a MacOSX version ?
- Where can I get the sources of MacSSH ?
How do I configure SSH2 in MacSSH ?
I did not write (yet?) any manual for this software, but here's some help (you can also find some more help from The Ohio State University server, at this location: Using MacSSH)
- key pair:
To create your key pair, go to the Favorites settings (Menu "Favorites", option "Edit Favorites…"), click on "Edit", and in the SSH2 tab, click "Initialize SSH". This is to be done only once for all SSH2 connections, and creates a couple of files named "identity" and "identity.pub" in MacSSH Prefs folder in MacOS Preferences folder.
identity is your private key file. don't give it to anyone.
identity.pub is the corresponding public key, which you give to SSH2 admins whose servers require a public key to accept connections.
If you intend to connect to OpenSSH/SSH2 servers using public key userauth, you will have to convert your public key to OpenSSH/SSH2 format by clicking on "Export public key…" and send the resulting file to the admin.
- Client configuration:
In the Favorites settings, tab SSH2, select the Encryption, Authentication and Compression methods to use, and, for a first connection to a host, leave the "Never trust unknown host key" unchecked. this will let MacSSH accept new keys from the SSH2 host you connect to. In the Favorites settings, tab Security, Select the Protocol ssh2 (Secure Shell), and enter your login (mandatory). You can leave the password blank if you don't want to save it in MacSSH preferences, it will be asked later. You should now be able to connect to the host.
- TCP Port Forwarding:
Duplicate the Favorite you want to connect to for port forwarding (or create a new favorite from scratch configured for SSH2), and in the SSH2 tab, select either Local or Remote TCP Port forwarding as Method. Enter the Local Port number, the Remote Host Name and the Remote Port Number, where Local Port number is the port number you want to use on your Mac as listener, and (Remote Host Name, Remote Port Number), the target service you want to use. Connect this session. You should then be able to use your favorite app connected on 127.0.0.1:localport, tunnelled via MacSSH to the SSH2 server, itself connected (unencrypted, this time) to remotehost:remoteport. Note that 'remote host' is generally the same host as the SSH2 server you're connected to, or close to it. If you want to know more about this feature, I highly recommend lsh documentation from the current lsh archive /doc/lsh.html file.
More info on port forwarding with some screenshots is available at the University of Pennsylvania server at this location: Port Forwarding on the Macintosh
If you have problems to connect to a host, you can activate the verbose/debug/trace modes from the SSH2 tab, leave the terminal window opened, by checking the "Windows don't go away" box in the Preferences dialog, and type Cmd-' (single quote) to open the console window. The connection traces will be displayed in this window.
How do I setup Applescript for MacSSH ?
Setup your <Default> favorite to use SSH2 so that connections automatically use SSH instead of telnet. to open a connection you can use:
tell application "MacSSH"
connect host "domain.com" login "name" password "pass"
or you can use your internet control panel and set in the advanced tab the telnet protocol to use the MacSSH program or even add SSH as a protocol.
now from your favorite program you can issue a:
remember that the last example uses the <Default> favorite from macssh so be sure to put that to ssh or telnet whichever you generally use. For applescript you can issue:
connect "<Default>" host ....
connect "Favorite1" host ... etc.
How do I use my Public Key with OpenSSH ?
Export your public key in SSH2 format. Copy this file's content on your SSH2
host in a text file, for instance 'ssh2.pub', and execute the command:
ssh-keygen -i -f ssh2.pub >> ~/.ssh/authorized_keys2
A more detailed 'howto' on public key management in MacSSH is available on Dartmouth
College's web server at this location: MacSSH
SSH2 Key Exchange How-to
Thanks to Marion Bates for this contribution.
How do I setup CVS in MacSSH ?
Let's say you need to access the project CVSPROJECT, on the sourceforge cvs server, as user CVSUSER, with password CVSPASS:
1) MacSSH settings:
Create a favorite configured with SSH2 for the CVS server you want to connect to:
port: 22 (SSH default)
protocol: ssh2 (secure shell)
command: -N -E"cvs -d /cvsroot/CVSPROJECT server"
method: CVS port forwarding
local port: 514 (CVS)
2) MacCVS settings:
authentication: Rsh (".rhosts" file)
3) Connect MacSSH to the server, then use MacCVS as usually.
The connection fails with message "do_zlib: inflate() failed: unknown compression method"
Select either "zlib" or "none" for the compression method in the SSH2 tab, but not "all in order".
The connection dies without any error message
Try forcing the authentication to either "SHA1" or "MD5".
When I open a second forwarded session on the same local port, MacSSH displays "lsh: Invalid argument, (errno = 22)"
Once a local port is forwarded, it is no longer available for any other listener on the local host.
But you can still open as many connections as you want from this port.
It is sloooow, can't you do anything to make it faster ?
In the main preferences dialog, set the TimeSlice to 0.
'debug' and 'trace' logging can also slow a lot the connection, so use these options only when experiencing troubles.
And last, if you find the display slow, you can check 'jump scrolling' in the the terminal settings.
I've changed the Terminal colors to white on black, but the bold text is still displayed in black.
In the main preferences dialog, click on 'ANSI Colors' and select a color other than black.
How can I use different key-pairs for different hosts ?
You'll need to rename your keys, for instance identityX and identityX.pub, and add the option:
in the 'Command' field of the security tab.
I need to forward many different ports from the same SSH2 server. Is there an easier way than using many favorites ?
You can add several '-Llocalport:remotehost:remoteport' in the 'Command' field of the security tab
How do I forward X11 sessions with MacSSH ?
check the 'forward X11' checkbox in the SSH2 tab of your favorite.
Note that the X.11 forwarding option is only available in MacSSH version 2.1fc2 or higher.
Why can't I kerberize after MacSSH has been running for a day ?
Because your Kerberos is broken. Upgrade to MIT V4.0.2
Why can't I see accented characters, even though I selected ISO-8859-1 as translation ?
The default selected font, ANSI/PC doesn't contains the full character set, but the graphic set instead. Try selecting a different font, Monaco for instance, in the Edit->Terminals menu selection.
Will you add SSH1 support ?
I'm afraid no. I used lsh because I found it the easiest to port, but it is based on the new SSH2 standard only.
I could not find any sources for SSH1 already ported to the MacOS. NiftyTelnet is not OpenSource, and
the SSH1 version of BetterTelnet is not available as source-code.
Anyway, there is already a free and excellent SSH1 client for MacOS, NiftyTelnet, written by Jonas Walldén.
Will you add SFTP (SCP) support ?
The bad news is that I finally won't add SFTP to MacSSH.
The good news is that after working more than one year for free on MacSSH, I
decided I deserved some return, so I have made a port of OpenSSH to MacOS8/9
to get rid of the restrictive GPL License and make a shareware.
Try this version of MacSFTP Carbon
or this MacSFTP Classic for people not using CarbonLib.
Note that this version is limited to a 15 days trial when not registered.
Will you make a MacOSX version ?
no. this is way too much work. Kevin Grant is already working on MacTelnet3, a carbon version of NCSA Telnet, and I've been told he's adding SSH2 support too. now, if you want to carbonize MacSSH, then get the sources as explained below, and carbonize it...
Where can I get the sources of MacSSH ?
MacSSH sources are now available on sourceforge via anonymous cvs server:
authentication: Password ("pserver")
then checkout module "MacSSH" in an empty "MacSSH" folder.
with MacCVS Pro:
Default module: MacSSH
Server hostname: cvs.macssh.sourceforge.net
CVS Root: /cvsroot/macssh
Authentication method: Password
CVS User Name: anonymous
CVS Password: (empty)
then checkout default module in an empty "MacSSH" folder.
note that you'll need Metrowerks CodeWarrior Pro 6, 7 or 8 to compile all the projects.