Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mkwardakov/0e6da131e33474c85827fa0077318db6 to your computer and use it in GitHub Desktop.
Save mkwardakov/0e6da131e33474c85827fa0077318db6 to your computer and use it in GitHub Desktop.
Worklog
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'hfm4/centos7'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'hfm4/centos7' is up to date...
==> default: Setting the name of the VM: testV_default_1468827488759_88757
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Mounting shared folders...
default: /vagrant => /home/michael/repos/testV
$ vagrant status
Current machine states:
default running (virtualbox)
The VM is running. To stop this VM, you can run `vagrant halt` to
shut it down forcefully, or you can run `vagrant suspend` to simply
suspend the virtual machine. In either case, to restart it again,
simply run `vagrant up`.
$ vagrant ssh
[vagrant@localhost ~]$ cat .ssh/authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6GteA1xxkIqA/tk4Wb7VOUt+pEqjGGCuXEZIu/M+5l3qxLL7dYF8oVZr6PYH/TXso5NfgucI794vhjIVhlY6HixRrY+2SS/pLav9epsWIfUFyzPfwCUGVBBYmGmTswxUbXyFS9F1Sp/ZzEL0WOjOTxikWCzExxYpF34TVyZJKz3SEYNvTq1trU1XQdbS71EcZ+wHA1nocRxxeK40TWuMaFdd5XkKsFE0emanUCEWbTAPMduFyyUHwK8paaHwsQJB0x291RMY0Sh0ZXN+ZjZ96Fl3V67GUqCPrak/kpTWR6FzW2swSBU+cHqreQPhX5w+b/MeSrV+SsZ2evBd6+SLv vagrant[vagrant@localhost ~]$
[vagrant@localhost ~]$ logout
Connection to 127.0.0.1 closed.
$ ssh-copy-id -p 2222 vagrant@127.0.0.1
The authenticity of host '[127.0.0.1]:2222 ([127.0.0.1]:2222)' can't be established.
ECDSA key fingerprint is SHA256:BVjcEV0qPt9KX7UahsxElpDgUtCsou4UXTueY7A/HvI.
Are you sure you want to continue connecting (yes/no)? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
vagrant@127.0.0.1's password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh -p '2222' 'vagrant@127.0.0.1'"
and check to make sure that only the key(s) you wanted were added.
$ ssh -p '2222' 'vagrant@127.0.0.1'
vagrant@127.0.0.1's password:
$ vagrant ssh
Last login: Mon Jul 18 16:42:44 2016 from 10.0.2.2
[vagrant@localhost ~]$ cat .ssh/authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6GteA1xxkIqA/tk4Wb7VOUt+pEqjGGCuXEZIu/M+5l3qxLL7dYF8oVZr6PYH/TXso5NfgucI794vhjIVhlY6HixRrY+2SS/pLav9epsWIfUFyzPfwCUGVBBYmGmTswxUbXyFS9F1Sp/ZzEL0WOjOTxikWCzExxYpF34TVyZJKz3SEYNvTq1trU1XQdbS71EcZ+wHA1nocRxxeK40TWuMaFdd5XkKsFE0emanUCEWbTAPMduFyyUHwK8paaHwsQJB0x291RMY0Sh0ZXN+ZjZ96Fl3V67GUqCPrak/kpTWR6FzW2swSBU+cHqreQPhX5w+b/MeSrV+SsZ2evBd6+SLv vagrantssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC37+K6XT+mcZhDtP4cbIRyxywTTt9R312iAjlaFyxbGj4Po7apaUQm8ayVXtc116UfYk0eJgFB2c/xIfsTtb7W/dpKHBW7YpSQZdMrWrB8pNR1C4q8PQgKorOcXflWFx6XpmQBhO2qWL9phRxYI202MAGGAc8/lTKAC0VhRl/9bMzar/+6on7ALJqEQYdO22Adfz7DyVK8AUfIPTSrBorIbXSKKEhb6JXD4L2C8ubeL8fsTtshpMxiRMNsansCvtUEanTgk4wFN3tECLUKFbY7BgOgaHgTlBMNY7uwdA29VVxkMi9r3oP0LY5eoxakt2oThjYAYgIspXtRioWll0H3 michael@ThinkPad-T520
[vagrant@localhost ~]$ logout
Connection to 127.0.0.1 closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment