Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

On all of the servers that I regularly interact with, I have ssh-keys setup for passwordless access via ssh. Yet, every time I attempt to start a remote-kernel over ssh, I get asked for a password despite having a ssh-keyagent up and running. What do I need to add to the kernel configuration, such as the launch command, to have it use my ssh-key?

I'm using version 8.0.4 on MacOS 10.6.8, if it makes a difference.

share|improve this question

1 Answer 1

up vote 16 down vote accepted

Mathematica by default uses its own ssh implementation. You can see it in the dialog of the remote kernel configuration dialog in the advanced options: `java` -jar `mathssh`. As far as I know, you can safely replace that with the local ssh command (most likely /usr/bin/ssh). You have to select the "Advanced Options" radiobutton to do that (if you first add all the standard options, the rest of the command is already filled in correctly).

Edit: By default, Mathematica uses the launch command

`java` -jar "`mathssh`" user@hostname math -mathlink 
       -LinkMode Connect -LinkProtocol TCPIP -LinkName "`linkname`" 
       -LinkHost `ipaddress`

to invoke ssh, where user and hostname are filled in via text boxes above. To use the local ssh command, you need to change the above command to

ssh user@hostname "math -mathlink -LinkMode Connect -LinkProtocol TCPIP 
                        -LinkName `linkname` -LinkHost `ipaddress`"

This appears to have one flaw, killing the remote kernel via the front-end no longer kills the processes on the remote server. So, that will have to be done by hand.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.