VS Code Remote SSH - How to Set Up Passwordless connection

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] welcome brainers VSS code is not just limited to your local development that's right you can simply open any folder on a remote machine using SSH and edit code as if it were right there on your local computer in the initial part of this video we'll show you how to set up an SSH connection right after that we'll explore the settings to achieve passwordless connectivity without further Ado let's get started please open your Visual Studio code application on the left side panel click on the extensions icon search and install remote SSH from Microsoft after installation click on the remote icon at the bottom left corner of the VSS code editor choose connect to host select add new SSH host type in your user ID followed by the at then the host name press enter please select the path for your config file preferably in the user's home directory the host is successfully added you can choose to connect from here alternatively for subsequent connections click on the remote icon located at the bottom left corner choose connect to host and select the host name from the available options enter the password when prompted and hit enter it's now connected to remote go ahead and open the folder if prompted please enter the password once again that's all you're now all set to commence your remote development this is my website hosted on an ec2 remote server to which I've just set up connection I can easily change the code in my vs code editor and the changes are reflected immediately all right let's now proceed to set up passwordless connectivity for passwordless connection we need a private and a public key pair in case you already got the private key received from your cloud provider you can use it directly in subsequent steps especially you no need to worry about serers side public key setup if you don't have the key I'll guide you on creating both private and a public key manually and right after that we transfer the public key to the remote server please open your command prompt and enter SSH hyphen key gen just hit the enter key a few times without typing anything navigate to the user's home directory specifically the SSH hidden folder you should see two new files created in this folder the private key file should stay on your local computer ensure that only the current user has access to this file additionally make sure to mention your private key file name as the identity file in your configuration file next move the public key file to the remote server using win SCP or any other preferred method copy or transfer the public key file from the local home directories. SSH folder to the SSH folder in the remote home directory rename the key file to authorized underscore keys on the server and ensure that only the owner or the current user has read and write access to this file log into the server an open sshd config file in the ETC SSH folder double check that Pub Key authentication is set to yes any changes in this file require an SSH demon restart with this pseudo system to restart sshd command we are all set to experience passwordless connection to the remote server great no more password prompts everything works as expected I hope this helpful please do like the video and subscribe to our Channel if you have any questions or thoughts please feel free to leave them in the comments section below thanks for watching
Info
Channel: Brainers Technology
Views: 5,948
Rating: undefined out of 5
Keywords: ssh, remote, code, keep asking for password, vscode, vs, visual, studio, password, for, to, asking, development, connect, keep, how, connection, with, using, server, extension, remote ssh, code remote, vs code, visual studio, studio code, vscode remote, remote development, vscode ssh, code remote ssh, visual studio code, vs code remote
Id: uLpwmz_ofCg
Channel Id: undefined
Length: 4min 55sec (295 seconds)
Published: Wed Jan 03 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.