docs: enhance SSH configuration documentation and testing
Some checks failed
scp files / test scp action (push) Failing after 4s
scp files / test deploy artifact (push) Failing after 6s
scp files / test changed-files (push) Failing after 6s
scp files / test target folder (push) Failing after 3s
scp files / test Multiple Host (push) Failing after 3s

- Replace detailed SCP and SSH proxy settings with a table format for better readability
- Improve clarity and grammar in instructions for creating and using SSH keys

Signed-off-by: appleboy <appleboy.tw@gmail.com>
This commit is contained in:
appleboy 2024-12-25 09:04:14 +08:00
parent 2a829c0ed2
commit 3d59448764
No known key found for this signature in database

View File

@ -34,46 +34,50 @@ jobs:
See the [action.yml](./action.yml) file for more detail information. See the [action.yml](./action.yml) file for more detail information.
- host - scp remote host | Variable | Description | Default Value |
- port - scp remote port, default is `22` | ------------------- | ----------------------------------------------------------------------------------------------------------- | ------------- |
- username - scp username | host | SCP remote host | - |
- password - scp password | port | SCP remote port | `22` |
- passphrase - the passphrase is usually to encrypt the private key | username | SCP username | - |
- protocol - The IP protocol to use. Valid values are `tcp`. `tcp4` or `tcp6`. Default to `tcp`. | password | SCP password | - |
- fingerprint - fingerprint SHA256 of the host public key, default is to skip verification | passphrase | The passphrase is usually used to encrypt the private key | - |
- timeout - timeout for ssh to remote host, default is `30s` | protocol | The IP protocol to use. Valid values are `tcp`, `tcp4`, or `tcp6`. | `tcp` |
- command_timeout - timeout for scp command, default is `10m` | fingerprint | Fingerprint SHA256 of the host public key. Default is to skip verification | - |
- key - content of ssh private key. ex raw content of ~/.ssh/id_rsa | timeout | Timeout for SSH to remote host | `30s` |
- key_path - path of ssh private key | command_timeout | Timeout for SCP command | `10m` |
- target - target path on the server, must be a directory (**required**) | key | Content of SSH private key. e.g., raw content of ~/.ssh/id_rsa | - |
- source - scp file list (**required**) | key_path | Path of SSH private key | - |
- rm - remove target folder before upload data, default is `false` | target | Target path on the server, must be a directory (**required**) | - |
- strip_components - remove the specified number of leading path elements. | source | SCP file list (**required**) | - |
- overwrite - use `--overwrite` flag with tar, overwrite existing files when extracting | rm | Remove target folder before uploading data | `false` |
- tar_tmp_path - temporary path for tar file on the dest host | strip_components | Remove the specified number of leading path elements | - |
- tar_exec - path to tar executable on the dest host. default is `tar` | overwrite | Use `--overwrite` flag with tar, overwrite existing files when extracting | - |
- tar_dereference - use `--dereference` flag with tar, follow symlinks; archive and dump the files they point to | tar_tmp_path | Temporary path for tar file on the destination host | - |
- use_insecure_cipher - include more ciphers with use_insecure_cipher (see [#15](https://github.com/appleboy/scp-action/issues/15)) | tar_exec | Path to tar executable on the destination host | `tar` |
| tar_dereference | Use `--dereference` flag with tar, follow symlinks; archive and dump the files they point to | - |
| use_insecure_cipher | Include more ciphers with use_insecure_cipher (see [#15](https://github.com/appleboy/scp-action/issues/15)) | - |
SSH Proxy Setting: SSH Proxy Setting:
- proxy_host - proxy host | Variable | Description | Default Value |
- proxy_port - proxy port, default is `22` | ------------------------- | ----------------------------------------------------------------------------------------------------------- | ------------- |
- proxy_username - proxy username | proxy_host | Proxy host | - |
- proxy_password - proxy password | proxy_port | Proxy port | `22` |
- proxy_protocol - The IP protocol to use. Valid values are `tcp`. `tcp4` or `tcp6`. Default to `tcp`. | proxy_username | Proxy username | - |
- proxy_passphrase - the passphrase is usually to encrypt the private key | proxy_password | Proxy password | - |
- proxy_timeout - timeout for ssh to proxy host, default is `30s` | proxy_protocol | The IP protocol to use. Valid values are `tcp`, `tcp4`, or `tcp6`. | `tcp` |
- proxy_key - content of ssh proxy private key. | proxy_passphrase | The passphrase is usually used to encrypt the private key | - |
- proxy_key_path - path of ssh proxy private key | proxy_timeout | Timeout for SSH to proxy host | `30s` |
- proxy_fingerprint - fingerprint SHA256 of the host public key, default is to skip verification | proxy_key | Content of SSH proxy private key | - |
- proxy_use_insecure_cipher - include more ciphers with use_insecure_cipher (see [#15](https://github.com/appleboy/scp-action/issues/15)) | proxy_key_path | Path of SSH proxy private key | - |
| proxy_fingerprint | Fingerprint SHA256 of the host public key. Default is to skip verification | - |
| proxy_use_insecure_cipher | Include more ciphers with use_insecure_cipher (see [#15](https://github.com/appleboy/scp-action/issues/15)) | - |
## Setting up a SSH Key ## Setting up a SSH Key
Make sure to follow the below steps while creating SSH Keys and using them. Make sure to follow the steps below when creating and using SSH keys.
The best practice is create the SSH Keys on local machine not remote machine. The best practice is to create the SSH keys on the local machine, not the remote machine.
Login with username specified in Github Secrets. Generate a RSA Key-Pair: Log in with the username specified in GitHub Secrets and generate an RSA key pair:
```bash ```bash
# rsa # rsa