Greetings. I am attempting to connect from aquamacs emacs + slime on my Mac to a remote lisp on Ubuntu 10.10. These machines are both on my LAN.

On the Mac I am using ccl 1.6 64-bit, with the slime/swank provided by aquamacs as of yesterday. This is described on the aquamacs site as Aquamacs-slime-2010-12-28.pkg.tgz.

On Ubuntu 10.10 I am using ccl 1.7 32-bit, with yesterday's FAIRLY-STABLE slime/swank.

I followed the instructions in the slime manual to connect locally on both machines. That is, I can start ccl in a terminal, fire up a swank server, and then connect from emacs/aquamacs by means of M-x slime-connect to the server on the same machine.

On Ubuntu, I have an ssh server running. I can log in from the Mac to Ubuntu over ssh with no problems.

In a terminal on my Mac I do the incantation suggested in the slime manual p.26, i.e.

  ssh -L4005:127.0.0.1:4005 david@10.0.1.6

The result of keying in the above is that I get a prompt for a password, and an apparently successful connection to the Ubuntu machine. It does open up a "visible" ssh session, i.e. I see an ubuntu prompt in my Mac terminal. It looks just like a regular ssh login; I don't know if that is what is expected.

However, when I then do M-x slime-connect in aquamacs and connect to 127.0.0.1 port 4005 I get this message in aquamacs:

  Lisp connection closed unexpectedly: connection broken by remote peer.

And in the ssh terminal session on the Mac to Ubuntu I see this:

  channel 3: open failed: connect failed: Connection refused

I know *nothing* about ssh, or for that matter networking generally. For example, I have no idea why we need to "fool" emacs into thinking it is talking to 127.0.0.1. However, this appears to me to be an ssh problem, as a wild guess.

Any suggestions? Does the failure to connect have anything to do with ccl/swank/slime, or do I have some ssh pondering to do?

If I should be attaching some kind of log or other info that I do not know about, please let me know.

Best,

- Phil -