mirror of
https://github.com/muerwre/muerwre.github.io.git
synced 2025-04-24 18:36:41 +07:00
16 lines
275 B
Markdown
16 lines
275 B
Markdown
Downloads file from #SSH with rsync and puts it in current folder.
|
|
|
|
```bash
|
|
#!/bin/bash
|
|
|
|
PORT=22
|
|
USER=user
|
|
HOST=example.com
|
|
REMOTE_PATH=/tmp
|
|
REMOTE_FILE=sample.text
|
|
DEST_PATH=./
|
|
|
|
rsync -a -e "ssh -p $PORT" -P -v \
|
|
"$USER@$HOST:$REMOTE_PATH/$REMOTE_FILE" \
|
|
"$DEST_PATH"
|
|
```
|