chore: initial commit
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
# sftp_testing
|
||||
|
||||
A scratch project for troubleshooting and debugging the behavior of parallel SSH/SFTP connections to target machines using the `ssh2-sftp-client` npm library.
|
||||
|
||||
## What it does
|
||||
|
||||
`index.ts` spawns 6 worker threads concurrently. Each worker connects to an SFTP server, uploads `test.txt` as `<runIndex>-test.txt`, then deletes the remote file. The goal is to reproduce and inspect issues that arise when many connections are opened against a target host at the same time.
|
||||
|
||||
## Setup
|
||||
|
||||
```bash
|
||||
npm install
|
||||
cp config.example.json config.json
|
||||
```
|
||||
|
||||
Then fill in `config.json` with real credentials. Multiple profiles are supported; pass a profile name as the first CLI argument (defaults to `default`):
|
||||
|
||||
```bash
|
||||
npx tsx index.ts
|
||||
npx tsx index.ts ftp.stevanfreeborn.com
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
- Connection settings (host, port, username, password) are loaded from `config.json`.
|
||||
- Each worker runs the same upload/delete sequence independently against the same target.
|
||||
- On success, the main thread prints: `All workers completed execution successfully.`
|
||||
Reference in New Issue
Block a user