Skip to main content

Easy Access to Pentesting VPS with via VS Code

Am a big fan of using VPS as my workspace (pentesting/development/and basic tasks) and have been using it for a long period of time now,.

If you dont know how to setup a VPS for Pentesting or Development sake, feel free to check this step by step guide on Setting Up Ubuntu Linux VPS For Offensive Security and Pentesting

Everything with an advantage will also have a disadvantage, and some of the disadavantages of using a VPS as a workspace are;

  1. The movement of files from my local system to my VPS, vice versa
  2. Spinning up nano everytime to write and searching through files for a pattern and all that and more.

Although i do find my way around this issues via Terminal, but having a nice way to access this thing can be helpful and speed up work rate.

That brings us to the VS Code Software and its awesome Extension named Remote -SSH

With this you can access your VPS environment through a nice Interface good for navigation, can be handy when doing Android App Pentest.

Where you decompile Apks and grep through th files or looking through manually.

Creating files and editing files easily, so when you are done with installation, here is how to get your things up and running.

  1. Enable the Remote - SSH Extension after installation, you might also be prompted to install another Extension name Remote - SSH Editing Configuration Files, install and enable it also.
Remote SSH Extension
  1. If you are on Windows, press F1 button to spin up a command box on VS Code For Mac users, press, Shift + Comand + P

Then enter the "remote-ssh" in the box, it will show you all the Remote SSH options.

Remote SSH Box

Then you pick the "Remote-SSH: Connect to Host..." Option, that should spin up another box, asking you to input your VPS username and host, in this format username@host, e.g saintmalik@209.97.157.7.

Remote SSH Box
  1. It's time to input your VPS Password
Remote SSH Box
  1. Now that we are in, let's play inside our VPS environment

Creating folders inside our Ubuntu VPS

Remote SSH Box

Seeing the folder realtime on our VPS environment via our Terminal

Remote SSH Box
  • Creating files inside our Ubuntu VPS via VS Code and seeing it realtime on our VPS environment via our Terminal.
Remote SSH Box
  • Writing inside our created file in VPS via VS Code and seeing it real time via terminal
Remote SSH Box
  • Drag and dropping files from my local system into my Ubuntu VPS Environment
Remote SSH Box
  • Deleting files on our VPS Environment Easily
Remote SSH Box
info

Before i knew about this, i do use the scp -P 22 username@127.0.0.1 to upload and download files between my local system and VPS Environent

✌️.