Skip to main content
hilltran

1 week ago

Unable 2 login virtual machine with ssh from local Visual Studio

Lecture: Setting up VS Code for Remote Python Development;

unable to login the virtual machine(VM) with ssh from visual studio(VS). The Cloud Playground terminal works fine but could not get connect to VM. The following errors below and see video shows does connect & screenshot  the SHA code matches

user_701723_5e1e8cd1aa4ac.png_800.jpg

user_701723_5e1e8ee361b22.gif_800.jpg[14:05:48.897] Fingerprint dialog canceled

[14:05:48.898] "install" terminal command canceled

[14:05:48.899] Resolver error: Connecting was canceled

Image of ermin
ermin
1 week ago
You are able to log in, but you are not using a key based login, try manually specifying a path to your key file with ssh -i /path/to/key/file username@address
Image of hilltran
hilltran
1 week ago

thank Ermin, I don't completely understand how to do that. I tried the following in VS  in the terminal screenshot below. Mine understanding of the code:

"ssh -i" #switch to ssh? 

 "/path/to/key/file" #path of the key file on my Linux Server?

" username@address" #linux server address.

ssh -i /.ssh/id_rsa-remote-ssh cloud_user@hilltran2c.mylabserver.com

after that that didn't work, I created "mkdir" a folder "sshfolder" to see if it would work on my local machine and used the following:

ssh -i /Users/hieu/Downloads/pythonFiles/sshfolder cloud_user@hilltran2c.mylabserver.com

user_701723_5e20f27429d40.png_800.jpg

I realise conceptually, the "public key is stored in ~/.ssh/authorized_keys on the server and private key is possessed" in my local.

I need to go back and redo all the steps.