Next: , Previous: Setting up the lisp image, Up: Connecting to a remote lisp


7.1.2 Setting up Emacs

Now we need to create the tunnel between the local machine and the remote machine.

     ssh -L4005:127.0.0.1:4005 username@remote.example.com

That ssh invocation creates an ssh tunnel between the port 4005 on our local machine and the port 4005 on the remote machine1.

Finally we can start SLIME:

     M-x slime-connect RET RET

The RET RET sequence just means that we want to use the default host (127.0.0.1) and the default port (4005). Even though we're connecting to a remote machine the ssh tunnel fools Emacs into thinking it's actually 127.0.0.1.


Footnotes

[1] By default swank listens for incoming connections on port 4005, had we passed a :port parameter to swank:create-server we'd be using that port number instead