07-12-2020, 18:38
I have analyzed the issue. It seems to be related to the format of the SSH key generated by ssh-keygen.
The key has to be in the RSA format. The default format from ssh-keygen with Git Bash is OPENSSH.
There are several ways to fix this. Assuming that you are already using your id_rsa file for other servers, it may be recommendable to create a separate key for use with Repast. The "-m PEM" parameter is important here.
ssh-keygen -f /c/Users/Jonas/.ssh/id_repast -m PEM -t rsa
Replace "Jonas" in the path with your username.
The first line in the key file should be:
-----BEGIN RSA PRIVATE KEY-----
The public key can easily be authorized on the target server with ssh-copy-id:
ssh-copy-id -i ~/.ssh/id_repast <user>@<server>
After that, try logging into the server
ssh -i ~/.ssh/id_repast <user>@<server>
Although the Repast Simphony Batch Runs Getting Started guide states "Do not specify a passphrase." (in step four of section 2.3.2), I would generally recommend specifying a password for the private key. When using the password protected key in Repast Simphony, you will be prompted for the password.
Don't forget to change the default id_rsa key name in the Batch GUI if you choose to use another file name.
The key has to be in the RSA format. The default format from ssh-keygen with Git Bash is OPENSSH.
There are several ways to fix this. Assuming that you are already using your id_rsa file for other servers, it may be recommendable to create a separate key for use with Repast. The "-m PEM" parameter is important here.
ssh-keygen -f /c/Users/Jonas/.ssh/id_repast -m PEM -t rsa
Replace "Jonas" in the path with your username.
The first line in the key file should be:
-----BEGIN RSA PRIVATE KEY-----
The public key can easily be authorized on the target server with ssh-copy-id:
ssh-copy-id -i ~/.ssh/id_repast <user>@<server>
After that, try logging into the server
ssh -i ~/.ssh/id_repast <user>@<server>
Although the Repast Simphony Batch Runs Getting Started guide states "Do not specify a passphrase." (in step four of section 2.3.2), I would generally recommend specifying a password for the private key. When using the password protected key in Repast Simphony, you will be prompted for the password.
Don't forget to change the default id_rsa key name in the Batch GUI if you choose to use another file name.
