📎 Webclip
How to setup a Remote Development Server
The article describes a remote development setup on a non-production server. It creates a regular user with sudo access, installs an SSH key, hardens sshd, blocks incoming traffic with firewalld, disables IPv6, and installs fail2ban to reduce attack surface.
It also describes two ways to work on the server. One uses Vim, tmux, and zsh on the remote machine. The other uses VS Code with remote SSH support. For running apps locally in a browser, it forwards a remote port to the local machine through an SSH tunnel.
Reading notes#
- Use a non-root user with wheel access and keep root out of the normal workflow.
- Copy a public SSH key to the remote host and use key-based login instead of passwords.
- In sshd_config, disable root login and password authentication after confirming key login works.
- Set firewalld to block incoming traffic by default and allow only the local machine’s IP for SSH.
- Disable IPv6 through sysctl to reduce the exposed attack surface.
- Install fail2ban and configure it to ban repeated failed SSH login attempts.
- A remote dev setup can be used either through Vim, tmux, and zsh or through VS Code remote development.
- Use SSH port forwarding so a service running on the remote server can be opened in the local browser.
