sinpro.dev
Docs
Dev Environment
macOS Settings
  • Company Information
    • Portfolio
    • About
    • Services
    • Events
  • Dev Environment
    • macOS Settings
    • Chrome Extensions
    • VSCode Workspace Settings
    • VSCode Workspace Extensions
    • Global NPM Packages
    • npm-check-updates
    • SvelteKit
    • Customize Zsh
    • ChatGPT Prompts
    • Tailwind CSS
    • Warp
    • Keyboard Shortcuts
  • Assets
    • Assets
    • JPG/PNG to AVIF
    • TTF to WOFF2
  • Clean Code
    • Clean Code
    • Format
    • Quality
    • Variables
    • Functions
    • Objects and Data Structures
    • Classes
    • Concurrency
    • Error handling
    • Comments
  • Code Style
    • TypeScript Config
    • Prettier
    • ESLint
    • Stylelint
  • Testing
    • Vitest
    • Playwright
  • Git
    • Git Branches and Commits
    • Git Hooks
    • Git User Profiles
    • Git for Windows
  • GitHub
    • GitHub Issues
    • GitHub Pull Requests
    • GitHub Repository Settings
    • GitHub Branch Protection
    • GitHub Actions
  • Code Quality
    • SonarCloud Coverage
  • Server
    • SSH
    • PM2
    • Caddy
    • Updating the server
    • ngrok
  • Team sinProject
    • Our Team Policy
    • Equipment and Supplies
    • Books
    • Slack
    • Locales
    • Funny Apps
    • Docs History
  • Talk
    • Talk
    • Creating a Project
    • App Structure

Server

SSH

Edit this page

SSH Key Generation

Shell Session
$ mkdir ~/.ssh
$ cd ~/.ssh
$ ssh-keygen -t rsa
Enter file: ubuntu@sinpro-dev
Enter passphrase: ********
Bash
ssh -i ~/.ssh/ubuntu@sinpro-dev ubuntu@153.127.***.***

Using the SSH Config File

Create a new SSH client configuration: ~/.ssh/config

UNKNOWN
Host sinpro-dev
	HostName 153.127.***.***
	Port ****
	IdentityFile ~/.ssh/dev@sinpro-dev
	User dev

You can connect with the following command:

Bash
ssh sinpro-dev

Port changing

Packet Filtering

Set up a packet filter so you can connect to the destination port.

Installing netstat on Ubuntu

Shell Session
# sudo apt update && sudo apt upgrade
# sudo apt install net-tools

More Info >

Run the netstat

The SSH server on Ubuntu listen on TCP port 22 by default. You can run the netstat command to check ssh port currently running on:

Shell Session
# sudo netstat -tulnp | grep ssh

Configurations

Open the file:

Shell Session
# sudo micro /etc/ssh/sshd_config

Edit the file:

Markdown
Port XXXX

Restart the SSH server

Shell Session
# sudo systemctl restart ssh

Confirm that the port has been changed

Shell Session
# sudo netstat -tulnp | grep ssh

VSCode configuration

Install Remote - SSH VSCode Extension.

This extension allows you to use VSCode by connecting via SSH.

SonarCloud Coverage PM2
© sinProject. v0.73.0
On this page
  • SSH
  • SSH Key Generation
  • Using the SSH Config File
  • Port changing
  • Packet Filtering
  • Installing netstat on Ubuntu
  • Run the netstat
  • Configurations
  • Restart the SSH server
  • Confirm that the port has been changed
  • VSCode configuration