# Move a file between two machines

`scp` and `rsync` need a route between the two machines: an SSH login, a reachable address, often a VPN. A link needs none of that. Both machines only need to reach FuzzyShare over HTTPS.

## On the first machine

```sh
fuzzy put backup.tar.gz --ttl 1h --share
```

The only thing printed is the link.

## On the second machine

```sh
fuzzy fetch https://fuzzyshare.com/s/TOKEN
```

The file is saved under its original name. If the second machine does not have the CLI, `curl` works the same way, because the `raw_url` of a link serves the bytes directly:

```sh
curl -fLO https://fuzzyshare.com/s/TOKEN/raw
```

## Keep it private on the way

For anything sensitive, protect the link and send the passphrase another way:

```sh
fuzzy put db-dump.sql.gz --ttl 30m --passphrase "correct horse battery" --share
fuzzy fetch https://fuzzyshare.com/s/TOKEN --passphrase "correct horse battery"
```

## Pipe it, never touch the disk

Stream from a command on one side and into a command on the other:

```sh
pg_dump app | gzip | fuzzy put - --name app.sql.gz --ttl 1h --share
fuzzy fetch https://fuzzyshare.com/s/TOKEN -o - | gunzip | psql app
```

## Clean up

The file deletes itself when its lifetime ends. To stop sooner, run `fuzzy rm backup.tar.gz`; that also revokes every link to it.

## Related

- [Share a file from the terminal](use-terminal.md)
- [Share a file privately](use-private-sharing.md)
- [Command reference](cli-reference.md)
