gradle-ssh-plugin
gradle-ssh-plugin copied to clipboard
Support for .pem identity type
Amazon EC2 instances use .pem files as the identity. I am getting a reject HostKey:
error when trying to use that type of file.
remotes {
sandbox {
host = 'ec2-XX-XXX-XXX-XX.eu-west-1.compute.amazonaws.com'
user = 'ec2-user'
identity = file("${System.properties['user.home']}/.ssh/devtools.pem")
}
}
Am I using it incorrectly or is this type not supported. I am trying to replicate:
ssh -i ~/.ssh/devtools.pem [email protected]
Would you check if ~/.ssh/known_hosts
contains the host key of EC2 instance? reject HostKey:
means host key, not user key.
I can see both the public ip and public dns, however I notice they have the encryption type ecdsa-sha2-nistp256
whereas the rest have ssh-rsa
.
Any updates? The plugin supports both RSA and ECDSA type of host key.
I couldn't get it to work unfortunately
Now the plugin supports the feature to automatically add a host key to known_hosts. Please try knownHosts = addHostKey(file(...))
.