Connect to a Remote Server with SSH in VS Code -- Step-by-Step Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay hey everyone welcome to the channel and today in this video we are going to see how we can login in remote server with Visual Studio code or you can say how we can SSH into remote virtual machine with Visual Studio code so let's open the visual studio code so you can see this is our Visual Studio code and for this purpose we have to install one extension and that extension name is remote SSH you can see this extension is provided by microsoft.com and it has almost 15 lakh or 1.5 million downloads so let's install the extension so till the extension is installing I will show you I have already deployed a virtual machine on Microsoft Azure cloud and this is the public IP address for the virtual machine so let's try to okay our virtual machine is installed successfully so just Ctrl shift and P and open the command palette or you can open the command palette from this setting icon as well so search for remote so you can see remote SSH remote SSH add new host okay so I'm just going to click on add new host so here it will ask for SSH and username so I will provide command SSH my username is I'll go underscore trading underscore VM underscore user and add the rate and we need to provide the domain or IP for our virtual machine so I just copy the IP for virtual machine and paste it here and just press enter so after pressing enter it will show select SSH configuration files to update so vs in vs code we have SSH configuration files so the first file is here in user data your name SSH dot SSH and config okay and so I'm just going to hit on it so you can see host added and you can see here remote host added so open config file we can open the config file and you can see this is the host IP address you can see host name here and here you can see the user we can change the host name as well okay so in this way we can add the remote SSH configurations to the configuration file and here in bottom you can see this icon is open a remote window so as soon as I will click on it open a remote window you can see connect to the Windows host and you can see install additional host or select an option so I am just going to click on connect host so all the hosts available in your system are shown here so you can see this is my host which is shown here with the IP address so I'm just going to hit it on enter and it will open this in a new Visual Studio code window and here it will ask what kind of operating system is installed on the virtual machine so here you can see Linux Windows and Mac OS so our operating system is Linux so I will click on it and here you can see enter the password for your host thank you so I have entered the password and hit on enter so you can see connecting to the remote SSH and here you can see uh you selected Linux as the remote platform this will be stored in settings and here you can see the settings and can be changed there if needed okay I don't have any problem so Source remote SSH remote okay so as will okay so open folder if I click on open folder you can see it will show all the available folders on Virtual machines so I am just going to open this my algo folder and I am just going to hit on enter so we need to confirm the password once again I have entered my password and just hit enter so it will ask you yes do you want to open this so yes I want to open this so you can see I have open uh the files and you can see everything is available here you can see this code is not present in my uh this machine it is available on the remote server so you can see everything is here even though my Jupiter notebooks are also available here okay so in this way you can connect with the remote SSH I will show you open the terminal and here you can see new terminal is open and in terminal you can see I'll go trading VM user at the rate this is the machine name and we are in the folder I'll go folder so I am just going to hit LS minus l so this is the Linux command to show all the files and directories in a specific folder in our case it is algo folder so in this way you can set up a remote machine on your favorite Cloud platform and you can connect your uh Visual Studio code with the remote machine for better development experience so this is all for the today's video and if you think this video is helpful then don't forget to like share and subscribe we will meet you in the next video till then Happy coding
Info
Channel: SkillSharp
Views: 7,603
Rating: undefined out of 5
Keywords: VSCode, SSH, Remote Server, Secure Shell, Remote Development, Remote Connections, SSH Authentication, SSH Keys, VSCode Extensions, Debugging, File Editing, Command Execution, Troubleshooting, Collaborative Coding, Productivity, Tutorial, Step-by-Step Guide, SSH Configuration, SkillSharp
Id: qZwGyfN8X5A
Channel Id: undefined
Length: 6min 19sec (379 seconds)
Published: Sun Jul 02 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.