How to SSH between two Ubuntu VM's on Compute Hosts

asked 2017-10-25 23:47:19 -0500

Mohammed Moin gravatar image

I want to establish a ssh connection between two Ubuntu VM's on Compute Hosts. But i am getting error saying that Permission denied public key.

edit retag flag offensive close merge delete


Hi, Ensure you have added rule for SSH port 22 in the security group.

Praveen N gravatar imagePraveen N ( 2017-10-26 02:33:31 -0500 )edit

have you tried private key for authentication.

Else, create a new user on both Ubuntu VM's and try ssh between those.

TijoV gravatar imageTijoV ( 2017-10-26 04:40:28 -0500 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2017-10-26 08:08:47 -0500

updated 2017-10-26 10:01:14 -0500

This means that the ssh daemons on your Ubuntu instances are not configured for password-based login. Which is the norm for cloud servers.

Usually, when you start an instance, you provide a keypair, and when you ssh to the instance, you use the private key of that pair. Copy the private key to the instance where you run the ssh client, and use it when connecting to the second instance.

Another possibility is changing the ssh daemon config to allow password-based logins.

edit flag offensive delete link more

answered 2017-10-26 04:01:37 -0500

michelgokan3 gravatar image
  1. Make sure you have openssh installed on both machines.

  2. Make sure your ssh command is like this: ssh username@hostip

  3. Make you have enabled port 22 (SSH) for both vms

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2017-10-25 23:47:19 -0500

Seen: 296 times

Last updated: Oct 26 '17