When nrepl is invoked when the buffer contains a remote (tramp) file, the tramp properties of the file are used to construct a secure ssh tunnel between the local host and remote nrepl server.