{"id":18689026,"url":"https://github.com/nicklasfrahm/scp-action","last_synced_at":"2025-04-12T05:38:39.795Z","repository":{"id":37772564,"uuid":"367666163","full_name":"nicklasfrahm/scp-action","owner":"nicklasfrahm","description":"A Github Action to upload and download files via SCP.","archived":false,"fork":false,"pushed_at":"2024-12-11T23:37:00.000Z","size":24,"stargazers_count":17,"open_issues_count":3,"forks_count":9,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-12T05:38:34.031Z","etag":null,"topics":["action","github","scp","ssh"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nicklasfrahm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-15T15:26:50.000Z","updated_at":"2025-02-01T18:57:59.000Z","dependencies_parsed_at":"2024-06-19T01:55:28.943Z","dependency_job_id":"f4b77056-1ddb-404c-a288-e0570dc1b53c","html_url":"https://github.com/nicklasfrahm/scp-action","commit_stats":{"total_commits":31,"total_committers":2,"mean_commits":15.5,"dds":"0.12903225806451613","last_synced_commit":"ff9723c16c864e37adf7ef4111362b86905bfb04"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicklasfrahm%2Fscp-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicklasfrahm%2Fscp-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicklasfrahm%2Fscp-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicklasfrahm%2Fscp-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicklasfrahm","download_url":"https://codeload.github.com/nicklasfrahm/scp-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248525168,"owners_count":21118616,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["action","github","scp","ssh"],"created_at":"2024-11-07T10:39:43.708Z","updated_at":"2025-04-12T05:38:39.769Z","avatar_url":"https://github.com/nicklasfrahm.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 SCP File Transfer for GitHub Actions\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/nicklasfrahm/scp-action)](https://goreportcard.com/report/github.com/nicklasfrahm/scp-action)\n[![container](https://github.com/nicklasfrahm/scp-action/actions/workflows/container.yml/badge.svg?branch=main)](https://github.com/nicklasfrahm/scp-action/actions/workflows/container.yml)\n\nA [GitHub Action](https://github.com/features/actions) to upload and download files via SCP.\n\n## Usage\n\nPlease note that if you only specify a single file as source, the target must be a file name and not a folder.\n\n### 🔼 Uploading local files to remote target\n\n```yaml\nname: upload\n\non:\n  - push\n\njobs:\n  upload:\n    name: Upload\n    runs-on: ubuntu-latest\n    steps:\n      - name: Check out repository\n        uses: actions/checkout@master\n\n      - name: Upload file via SSH\n        uses: nicklasfrahm/scp-action@main\n        with:\n          direction: upload\n          host: ${{ secrets.SSH_TARGET_HOST }}\n          fingerprint: ${{ secrets.SSH_TARGET_FINGERPRINT }}\n          username: ${{ secrets.SSH_USER }}\n          key: ${{ secrets.SSH_PRIVATE_KEY }}\n          proxy_host: ${{ secrets.SSH_PROXY_HOST }}\n          proxy_fingerprint: ${{ secrets.SSH_PROXY_FINGERPRINT }}\n          proxy_username: ${{ secrets.SSH_USER }}\n          proxy_key: ${{ secrets.SSH_PRIVATE_KEY }}\n          source: |\n            path/to/source/a.txt\n            path/to/source/b.txt\n          target: path/to/target\n```\n\n### 🔽 Downloading remote files to local target\n\n```yaml\nname: download\n\non:\n  - push\n\njobs:\n  download:\n    name: Download\n    runs-on: ubuntu-latest\n    steps:\n      - name: Check out repository\n        uses: actions/checkout@master\n\n      - name: Download file via SSH\n        uses: nicklasfrahm/scp-action@main\n        with:\n          direction: download\n          host: ${{ secrets.SSH_TARGET_HOST }}\n          fingerprint: ${{ secrets.SSH_TARGET_FINGERPRINT }}\n          username: ${{ secrets.SSH_USER }}\n          key: ${{ secrets.SSH_PRIVATE_KEY }}\n          proxy_host: ${{ secrets.SSH_PROXY_HOST }}\n          proxy_fingerprint: ${{ secrets.SSH_PROXY_FINGERPRINT }}\n          proxy_username: ${{ secrets.SSH_USER }}\n          proxy_key: ${{ secrets.SSH_PRIVATE_KEY }}\n          source: path/to/source/a.txt\n          target: path/to/target/b.txt\n```\n\n## Input variables\n\nSee [action.yml](./action.yml) for more detailed information. **Please note that all input variables must have string values. It is thus recommend to always use quotes.**\n\n| Input variable                      | Default value | Description                                                                                                                      |\n| ----------------------------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------- |\n| `host`                              | _required_    | SSH host                                                                                                                         |\n| `port`                              | `22`          | SSH port                                                                                                                         |\n| `username`                          | `root`        | SSH username                                                                                                                     |\n| `passphrase`                        | _none_        | SSH passphrase                                                                                                                   |\n| `insecure_password`                 | _none_        | SSH password, not recommended for security reasons                                                                               |\n| `timeout`                           | `30s`         | Timeout for SSH connection to remote host                                                                                        |\n| `action_timeout`                    | `10m`         | Timeout for action                                                                                                               |\n| `key`                               | _none_        | Content of ssh private key, raw content of `~/.ssh/id_rsa`                                                                       |\n| `fingerprint`                       | _none_        | Fingerprint SHA256 of the host public key, see [Using host fingerprint verification](#using-host-fingerprint-verification)       |\n| `insecure_ignore_fingerprint`       | `false`       | Skip fingerprint verification of the host public key, not recommended for security reasons                                       |\n| `source`                            | _required_    | A list of files to copy                                                                                                          |\n| `target`                            | `.`           | A folder to copy to                                                                                                              |\n| `direction`                         | _none_        | Transfer direction, must be either `upload` or `download`                                                                        |\n| `proxy_host`                        | _none_        | SSH proxy host                                                                                                                   |\n| `proxy_port`                        | `22`          | SSH proxy port                                                                                                                   |\n| `proxy_username`                    | `root`        | SSH proxy username                                                                                                               |\n| `proxy_passphrase`                  | _none_        | SSH proxy passphrase                                                                                                             |\n| `insecure_proxy_password`           | _none_        | SSH proxy password                                                                                                               |\n| `proxy_key`                         | _none_        | Content of SSH proxy private key                                                                                                 |\n| `proxy_fingerprint`                 | _none_        | Fingerprint SHA256 of the proxy host public key, see [Using host fingerprint verification](#using-host-fingerprint-verification) |\n| `insecure_proxy_ignore_fingerprint` | _none_        | Skip fingerprint verification of the proxy host public key, not recommended for security reasons                                 |\n\n## Using host fingerprint verification\n\nSetting up SSH host fingerprint verification can help to prevent Person-in-the-Middle attacks. Before setting this up, run the command below to get your SSH host fingerprint. Remember to replace `ed25519` with your appropriate key type (`rsa`, `dsa`, etc.) that your server is using and `example.com` with your host. In modern OpenSSH releases, the _default_ key types to be fetched are `rsa` (since version 5.1), `ecdsa` (since version 6.0), and `ed25519` (since version 6.7).\n\n```bash\nssh example.com ssh-keygen -l -f /etc/ssh/ssh_host_ed25519_key.pub | cut -d ' ' -f2\n```\n\n## Contributing\n\nWe would ❤️ for you to contribute to `nicklasfrahm/scp-action`, pull requests are welcome!\n\n## License\n\nThis project is licensed under the [MIT license](./LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicklasfrahm%2Fscp-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicklasfrahm%2Fscp-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicklasfrahm%2Fscp-action/lists"}