![]() The easiest and one of the most effective ways is to use the ssh-copy-id for copying your public key residing at /home/username/.ssh/id_rsa.Ä«ut letâs first generate the public ssh key onto your local development environment. Use ssh-copy-id for copying public ssh key Using vagrant ssh-config and private key to ssh into vagrant without running vagrant sshÄ¡.Copy public ssh key using file provisioner.Using Rubyâs code File Module to copy public ssh key.Use ssh-copy-id for copying public ssh key.So to achieve that I consolidated following ways. " Answer - Well I had Ansible playbook which I need to run after starting my virtual machine but ansible canât communicate with my Virtual Machine unless I put my public SSH key into it." Now you might be wondering, since it's a virtual machine running in a development environment, why do I need to copy a public SSH key? When it comes to starting a virtual machine onto your development environment vagrant helps you to spin up the virtual machine with very few lines of codes.Ä«ut while working with Vagrant on my development environment one day I had a need to copy my public ssh keys to one of my virtual machines which I started using vagrant. ![]() Join the nixCraft community via RSS Feed, Email Newsletter or follow on Twitter.Vagrant helped developers to create a very lightweight, portable development machine which can be destroyed and recreated on the fly. He wrote more than 7k posts and helped numerous readers to master IT topics. ![]() Vivek Gite is the founder of nixCraft, the oldest running blog about Linux and open source.
0 Comments
Leave a Reply. |