Reputation: 1
I am trying to connect Visual studio code on my local windows to virtual machine on virtualBox via SSH, I started by creating a VM and i did the ipconfig to get the ip address i already installed ssh openssh server and client
In my windows i enterred this command to create ssh keys ssh-keygen -t rsa -b 4096 -f %USERPROFILE%/.ssh/linux_rsa and when i try to copy the key to the virtual machine
scp %USERPROFILE%/.ssh/linux_rsa.pub [email protected]:~/key.pub scp %USERPROFILE%/.ssh/linux_rsa.pub [email protected]:~/key.pub (ifconfig ==> the ip adress is 10.0.2.15 ans 127.0.0.1 and don't which one is the good one) it tells me CONNEXION refused
Upvotes: 0
Views: 930
Reputation: 1102
First step for me would be to connect with user and password.
Just try to connect to your VM from windows with ssh 10.0.2.15. If it asks for a password, the network connection ist ok.
It could also be, that your vm is not "visible" from outside. So, check you vm settings.
Upvotes: 1