By aaronmweiss
I have a VM running Ubuntu Server 18.04 on my local network. This local VM is not accessible outside my network. I want to connect this VM to my Droplet.
I already have an ssh key for this droplet, and I am able to connect no problems.
I created a new key on my local VM. Knowing that I could not connect to the Droplet from this VM, I copied and pasted my new key below my original key in authorized_keys.
However, even after a reboot, I am still unable to connect my VM to my Droplet. I am still able to connect to my Droplet using my first key.
What am I doing wrong?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @aaronmweiss,
What error do you get? Additionally, if checking the /var/log/messages or /var/log/secure do you see anything?
You should be able to see some errors there. Additionally, what I’m thinking is it’s most probably related to the key itself. Are you sure you’ve copied the .pub file? One other thing, maybe you’ve copied over only part of the SSH key file.
One last question, you mentioned you created the SSH key on the VM but how exactly are you accessing your local VM, is it via virtualbox, vagrant or something else?
Regards, KFSys
I do not have any /var/log/messages or /var/log/secure on either server.
The error I get is (info redacted): user@XXX.XX.XX.XXX: Permission denied (publickey).
I copied and pasted from my the contents of my VM’s .pub file from “ssh-rsa” all the way to the end of the comment. The key was generated on the VM with ssh-keygen -t rsa
My VM is a byhve VM on a FreeNAS sever. I access this VM via ssh on a Bitvise client. My goal is to obtain logs from my Droplet to this VM so they can be ingested by Graylog.
I’m thinking maybe creating the key on the Droplet and copy/pasting to the VM?
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.