Skip to main content

Jenkins: SSH connect with username and password to AWS Linux instance

Jenkins 2.46.1 does not support to have a ssh connection with default pem file from aws. To do the automatically deployment from Jenkins server, a ssh connection should be establish from Jenkins server to the instance.These are steps to do to enable the SSH connection:AWS instance:
  • Create a new user on the instance
  • Edit the SSH config file to enable Password authentication for SSH and especially, specify some special encryption algorithms that supports Jenkins 
File: /etc/ssh/sshd_config


Put this at the end of the file

KexAlgorithms diffie-hellman-group1-sha1,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1

Use the new created user for Jenkins  

Comments