remote-ftp

The list of things i do after i installed my RPi, to be able to benefit from SSH, Remote Desktop, Code Remotely via FTP using VSCode.

1. Assign static ip to the RPi

Edit dhcpcd.conf:
vim /etc/dhcpcd.conf

Set a static ip of 192.168.100.10 in my case:

interface eth0
static ip_address=192.168.100.10/24
static routers=192.168.100.1
static domain_name_servers=192.168.100.1

2. Enable SSH and VNC on RPi

Preferences -> Raspberry Pi configuration -> Interfaces

3. Connect via Remote Desktop

On RPi install xrdp
sudo apt-get install xrdp
On PC open Remote Desktop Connection and connect via the first option (Xorg)

4. Install ftp server to be able to code remotely with VSCode

On RPi:
sudo apt-get install pure-ftpd
sudo service pure-ftpd restart

On PC:
Install ftp-simple VSCode extension
After installed, in VSCode press F1 and type
>ftp-simple connection
Copy/paste the following configuration and edit the ip/user/password to the ones you use

[{
    "name": "192.168.100.10",
    "host": "192.168.100.10",
    "port": 21,
    "type": "ftp2",
    "username": "pi",
    "password": "***",
    "path": "/",
    "autosave": true,
    "confirm": false,
    "ignore": [
        "/**/node_modules",
        "/**/*.class"
    ]
}]

Finally, to access your folder remotely, in VSCode press F1 and select step by step to navigate to your folder (your folders may be different) or follow the gif above
>ftp-simple : Remote directory open to workspace, then
192.168.100.10 then
Home then
Pi then
<your-folder> then
. to select the current folder ftp-remote