Using VSCode for Remote Coding

Using VSCode for Remote Coding

Daily short news for you
  • Wow, I really didn't know about Gemini Code Assist before. I just heard that it's completely free for everyone now.

    When I checked it out, I saw that it’s similar to Github Copilot. Looking at the pricing table, free users have more limited features than paid users, but it still has basic features like suggestions and chat. Has anyone used Gemini Code Assist? What do you think about it? 😅

    Get coding help from Gemini Code Assist — now for free

    » Read more
  • If you want to quickly generate a UUID string on Linux/Unix:

    $ uuidgen 6AAB63E9-8C2E-4D74-B593-E53A67E0B88F

    If you frequently need to create a secret string or password:

    $ openssl rand -base64 24 6yCcJke/HbYzooOHkK7xVkvf0PXm8jeJ

    where 24 is the length of the string

    Or if you need a stronger encrypted string, install pwgen. Then

    $ pwgen -y 24 Sal5eguPh*aetah7giethoh3 aiv!ah2ohP.aiC8ei1lei2ei ood4Ea_shiel,ees9sor0tha ...

    » Read more
  • bolt.new has just been updated with "vision", everyone. For those who don't know, this is a tool that helps create interfaces by chatting with it. Just point and it will follow.

    Previously, you may have noticed that every time you asked it to make a change, it replaced the entire old code with new code, which was quite token-consuming. With the "vision" update, now you only need to precisely highlight the area that needs fixing and tell it, and it will only modify the code in that section. It's faster and more economical 😇

    x.com/boltdotnew/status/1892620446106886396

    » Read more

The Issue

There are times when you need to edit files directly on a server to participate in debugging or development. This process typically involves SSHing into the server, navigating to the project directory, using command-line editors like nano or vim to open files, and making edits. If you're a Vim enthusiast, you can turn it into a powerful text editor, but for others, Vim might be challenging to use.

In VSCode, there is an extension called Remote - Tunnels that allows you to directly open a project on a server while still utilizing all the features of VSCode. This means you can have syntax highlighting, code highlighting, and most of the extensions installed in your code editor. In today's article, let me guide you through the process.

Setup Steps

First, install the Remote - Remote - Tunnels.

Then click on the Remote button with two arrows in the lower-left corner of the screen.

Bước 1

Choose "Connect to Host" and then select "Add new SSH host" if you haven't added any configurations before.

Bước 2

An input box appears, requesting information to SSH into the server. For example, I log in as [email protected]:

Bước 3

Here, since I have set up SSH using an SSH key, VSCode automatically uses the key in my machine. If you don't have a key or log in with a password, you'll need to enter the password each time you "Connect to Host."

After entering the information, a new window will open to notify you that you have successfully connected to the server. Click on the "Open Folder" button to browse to your project folder, and then click "OK" to start writing code.

Buoc 4

In my opinion, besides coding, this method allows you to manage the files and folders created by the project during runtime. Additionally, you can commit directly from here, but be cautious as it may lead to unintended issues.

Premium
Hello

The secret stack of Blog

As a developer, are you curious about the technology secrets or the technical debts of this blog? All secrets will be revealed in the article below. What are you waiting for, click now!

As a developer, are you curious about the technology secrets or the technical debts of this blog? All secrets will be revealed in the article below. What are you waiting for, click now!

View all

Subscribe to receive new article notifications

or
* The summary newsletter is sent every 1-2 weeks, cancel anytime.

Comments (0)

Leave a comment...