mirror of
https://github.com/YGGverse/nexy.git
synced 2026-04-01 01:35:28 +00:00
Created SSH (markdown)
parent
629e2d8ced
commit
48e65772bb
1 changed files with 46 additions and 0 deletions
46
SSH.md
Normal file
46
SSH.md
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
## Linux
|
||||
|
||||
The tips below provide configuration details for accessing remote files over SSH and simply syncing your local content with the server.
|
||||
|
||||
### Create system user
|
||||
|
||||
1. `useradd -m nexy` - create new system user with its home directory
|
||||
2. `passwd nexy` - provide strong password
|
||||
3. `su nexy` - login as `nexy`
|
||||
4. `cd` - navigate to the home folder
|
||||
5. `mkdir /home/nexy/public` - create location for the public fies
|
||||
|
||||
### Firewall
|
||||
|
||||
Don't forget to open the SSH port to access your server remotely:
|
||||
|
||||
``` bash
|
||||
sudo ufw allow 22
|
||||
```
|
||||
* replace `22` with your custom port (if it's not default)
|
||||
* use additional filters to allow access from specified hosts.
|
||||
|
||||
### VSCode
|
||||
|
||||
This example is useful for syncing text files on save. Make sure you have this [SSH extension](https://marketplace.visualstudio.com/items?itemName=Natizyskunk.sftp) installed to continue.
|
||||
|
||||
Create `.vscode/sftp.json` file in the local project directory:
|
||||
|
||||
``` .vscode/sftp.json
|
||||
{
|
||||
"name": "",
|
||||
"host": "",
|
||||
"protocol": "sftp",
|
||||
"port": 22,
|
||||
"username": "nexy",
|
||||
"password": "",
|
||||
"remotePath": "/home/nexy/public",
|
||||
"uploadOnSave": true,
|
||||
"useTempFile": false,
|
||||
"ignore": [
|
||||
".vscode"
|
||||
]
|
||||
}
|
||||
```
|
||||
* provide your actual SSH `name`,`host`,`username`,`password` and `remotePath`
|
||||
* save and restart VSCode to apply the changes
|
||||
Loading…
Add table
Add a link
Reference in a new issue