Troubles with putty to connect to VM CentOS 7 (Vagrant / Virtualbox)

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












0















I've created a VM CentOS7 using Vagrant (2.2.3) and Virtual Box (5.2.24), on Windows 10 in this way (following these instructions ... https://blog.centos.org/2019/02/updated-centos-vagrant-images-available-v1901-01/)



vagrant init centos/7
vagrant up


And all works fine



Then I've installed the Guest Addition (rif. https://github.com/dotless-de/vagrant-vbguest), in this way



vagrant plugin install vagrant-vbguest


And my final Vagrantfile is the follow



Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.synced_folder ".", "/vagrant", type: "virtualbox"

config.vm.provider "virtualbox" do |vb|
vb.memory = "4096"
vb.name = "Test"
end
end


The vagrant up execution works fine



$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'centos/7' version '1901.01' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> 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: Warning: Connection reset. Retrying...
default: Warning: Connection aborted. Retrying...
default: Warning: Remote connection disconnect. Retrying...
==> default: Machine booted and ready!
[default] GuestAdditions 5.2.24 running --- OK.
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /vagrant => D:/Cesare/Personale/VagrantCentOS7/TestNew
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.


The VM starts but when I try to connect via Putty (SSH on port 22), using the IP address (192.168.33.10) I obtain the following error



enter image description here



Where am I doing wrong?










share|improve this question

















  • 2





    probably related to the line default: SSH auth method: private key which means: not plain text password. Imho It's vagrant's settings for ssh keys, not a CentOS problem.

    – A.B
    Feb 17 at 15:40











  • Thanks for the quick and useful reply. I think so ... I'm using a standard vagrant box (ref. https://app.vagrantup.com/centos/boxes/7), so I don't know how is configured, and I'm quite a newbie on these stuffs ... do you have some suggestions?

    – Cesare
    Feb 17 at 15:51











  • Sorry I never used vagrant

    – A.B
    Feb 17 at 16:41















0















I've created a VM CentOS7 using Vagrant (2.2.3) and Virtual Box (5.2.24), on Windows 10 in this way (following these instructions ... https://blog.centos.org/2019/02/updated-centos-vagrant-images-available-v1901-01/)



vagrant init centos/7
vagrant up


And all works fine



Then I've installed the Guest Addition (rif. https://github.com/dotless-de/vagrant-vbguest), in this way



vagrant plugin install vagrant-vbguest


And my final Vagrantfile is the follow



Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.synced_folder ".", "/vagrant", type: "virtualbox"

config.vm.provider "virtualbox" do |vb|
vb.memory = "4096"
vb.name = "Test"
end
end


The vagrant up execution works fine



$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'centos/7' version '1901.01' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> 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: Warning: Connection reset. Retrying...
default: Warning: Connection aborted. Retrying...
default: Warning: Remote connection disconnect. Retrying...
==> default: Machine booted and ready!
[default] GuestAdditions 5.2.24 running --- OK.
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /vagrant => D:/Cesare/Personale/VagrantCentOS7/TestNew
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.


The VM starts but when I try to connect via Putty (SSH on port 22), using the IP address (192.168.33.10) I obtain the following error



enter image description here



Where am I doing wrong?










share|improve this question

















  • 2





    probably related to the line default: SSH auth method: private key which means: not plain text password. Imho It's vagrant's settings for ssh keys, not a CentOS problem.

    – A.B
    Feb 17 at 15:40











  • Thanks for the quick and useful reply. I think so ... I'm using a standard vagrant box (ref. https://app.vagrantup.com/centos/boxes/7), so I don't know how is configured, and I'm quite a newbie on these stuffs ... do you have some suggestions?

    – Cesare
    Feb 17 at 15:51











  • Sorry I never used vagrant

    – A.B
    Feb 17 at 16:41













0












0








0








I've created a VM CentOS7 using Vagrant (2.2.3) and Virtual Box (5.2.24), on Windows 10 in this way (following these instructions ... https://blog.centos.org/2019/02/updated-centos-vagrant-images-available-v1901-01/)



vagrant init centos/7
vagrant up


And all works fine



Then I've installed the Guest Addition (rif. https://github.com/dotless-de/vagrant-vbguest), in this way



vagrant plugin install vagrant-vbguest


And my final Vagrantfile is the follow



Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.synced_folder ".", "/vagrant", type: "virtualbox"

config.vm.provider "virtualbox" do |vb|
vb.memory = "4096"
vb.name = "Test"
end
end


The vagrant up execution works fine



$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'centos/7' version '1901.01' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> 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: Warning: Connection reset. Retrying...
default: Warning: Connection aborted. Retrying...
default: Warning: Remote connection disconnect. Retrying...
==> default: Machine booted and ready!
[default] GuestAdditions 5.2.24 running --- OK.
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /vagrant => D:/Cesare/Personale/VagrantCentOS7/TestNew
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.


The VM starts but when I try to connect via Putty (SSH on port 22), using the IP address (192.168.33.10) I obtain the following error



enter image description here



Where am I doing wrong?










share|improve this question














I've created a VM CentOS7 using Vagrant (2.2.3) and Virtual Box (5.2.24), on Windows 10 in this way (following these instructions ... https://blog.centos.org/2019/02/updated-centos-vagrant-images-available-v1901-01/)



vagrant init centos/7
vagrant up


And all works fine



Then I've installed the Guest Addition (rif. https://github.com/dotless-de/vagrant-vbguest), in this way



vagrant plugin install vagrant-vbguest


And my final Vagrantfile is the follow



Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.synced_folder ".", "/vagrant", type: "virtualbox"

config.vm.provider "virtualbox" do |vb|
vb.memory = "4096"
vb.name = "Test"
end
end


The vagrant up execution works fine



$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'centos/7' version '1901.01' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> 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: Warning: Connection reset. Retrying...
default: Warning: Connection aborted. Retrying...
default: Warning: Remote connection disconnect. Retrying...
==> default: Machine booted and ready!
[default] GuestAdditions 5.2.24 running --- OK.
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /vagrant => D:/Cesare/Personale/VagrantCentOS7/TestNew
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.


The VM starts but when I try to connect via Putty (SSH on port 22), using the IP address (192.168.33.10) I obtain the following error



enter image description here



Where am I doing wrong?







centos virtualbox putty vagrant






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 17 at 15:34









CesareCesare

1011




1011







  • 2





    probably related to the line default: SSH auth method: private key which means: not plain text password. Imho It's vagrant's settings for ssh keys, not a CentOS problem.

    – A.B
    Feb 17 at 15:40











  • Thanks for the quick and useful reply. I think so ... I'm using a standard vagrant box (ref. https://app.vagrantup.com/centos/boxes/7), so I don't know how is configured, and I'm quite a newbie on these stuffs ... do you have some suggestions?

    – Cesare
    Feb 17 at 15:51











  • Sorry I never used vagrant

    – A.B
    Feb 17 at 16:41












  • 2





    probably related to the line default: SSH auth method: private key which means: not plain text password. Imho It's vagrant's settings for ssh keys, not a CentOS problem.

    – A.B
    Feb 17 at 15:40











  • Thanks for the quick and useful reply. I think so ... I'm using a standard vagrant box (ref. https://app.vagrantup.com/centos/boxes/7), so I don't know how is configured, and I'm quite a newbie on these stuffs ... do you have some suggestions?

    – Cesare
    Feb 17 at 15:51











  • Sorry I never used vagrant

    – A.B
    Feb 17 at 16:41







2




2





probably related to the line default: SSH auth method: private key which means: not plain text password. Imho It's vagrant's settings for ssh keys, not a CentOS problem.

– A.B
Feb 17 at 15:40





probably related to the line default: SSH auth method: private key which means: not plain text password. Imho It's vagrant's settings for ssh keys, not a CentOS problem.

– A.B
Feb 17 at 15:40













Thanks for the quick and useful reply. I think so ... I'm using a standard vagrant box (ref. https://app.vagrantup.com/centos/boxes/7), so I don't know how is configured, and I'm quite a newbie on these stuffs ... do you have some suggestions?

– Cesare
Feb 17 at 15:51





Thanks for the quick and useful reply. I think so ... I'm using a standard vagrant box (ref. https://app.vagrantup.com/centos/boxes/7), so I don't know how is configured, and I'm quite a newbie on these stuffs ... do you have some suggestions?

– Cesare
Feb 17 at 15:51













Sorry I never used vagrant

– A.B
Feb 17 at 16:41





Sorry I never used vagrant

– A.B
Feb 17 at 16:41










1 Answer
1






active

oldest

votes


















0














I've solved!



I've edited /etc/ssh/sshd_config file with sudo vi /etc/ssh/sshd_config and changed #PasswordAuthentication yes to PasswordAuthentication yes(uncommented the line ...).



Then I've restarted sshd service with the command sudo systemctl restart sshd and now all works fine when I connect my VM CentOS 7 from Putty.






share|improve this answer






















    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f501181%2ftroubles-with-putty-to-connect-to-vm-centos-7-vagrant-virtualbox%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    I've solved!



    I've edited /etc/ssh/sshd_config file with sudo vi /etc/ssh/sshd_config and changed #PasswordAuthentication yes to PasswordAuthentication yes(uncommented the line ...).



    Then I've restarted sshd service with the command sudo systemctl restart sshd and now all works fine when I connect my VM CentOS 7 from Putty.






    share|improve this answer



























      0














      I've solved!



      I've edited /etc/ssh/sshd_config file with sudo vi /etc/ssh/sshd_config and changed #PasswordAuthentication yes to PasswordAuthentication yes(uncommented the line ...).



      Then I've restarted sshd service with the command sudo systemctl restart sshd and now all works fine when I connect my VM CentOS 7 from Putty.






      share|improve this answer

























        0












        0








        0







        I've solved!



        I've edited /etc/ssh/sshd_config file with sudo vi /etc/ssh/sshd_config and changed #PasswordAuthentication yes to PasswordAuthentication yes(uncommented the line ...).



        Then I've restarted sshd service with the command sudo systemctl restart sshd and now all works fine when I connect my VM CentOS 7 from Putty.






        share|improve this answer













        I've solved!



        I've edited /etc/ssh/sshd_config file with sudo vi /etc/ssh/sshd_config and changed #PasswordAuthentication yes to PasswordAuthentication yes(uncommented the line ...).



        Then I've restarted sshd service with the command sudo systemctl restart sshd and now all works fine when I connect my VM CentOS 7 from Putty.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 21 at 17:22









        CesareCesare

        1011




        1011



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f501181%2ftroubles-with-putty-to-connect-to-vm-centos-7-vagrant-virtualbox%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown






            Popular posts from this blog

            Peggy Mitchell

            Palaiologos

            The Forum (Inglewood, California)