https://github.com/benoitchantre/setup-ssh-authentication-action
GitHub action to setup an SSH key-based authentication
https://github.com/benoitchantre/setup-ssh-authentication-action
actions authentication ssh
Last synced: 12 months ago
JSON representation
GitHub action to setup an SSH key-based authentication
- Host: GitHub
- URL: https://github.com/benoitchantre/setup-ssh-authentication-action
- Owner: benoitchantre
- License: mit
- Created: 2022-10-12T20:36:52.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-26T21:05:10.000Z (over 3 years ago)
- Last Synced: 2024-11-15T22:03:50.278Z (over 1 year ago)
- Topics: actions, authentication, ssh
- Homepage:
- Size: 6.84 KB
- Stars: 10
- Watchers: 5
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Setup SSH authentication
This action installs your private key and related files in `~/.ssh` to allow an SSH key-based authentication with a remote server.
## Usage
```yaml
- name: Setup SSH key
uses: benoitchantre/setup-ssh-authentication-action@1.0.1
with:
# Private key for connecting to remote hosts.
# Required.
private-key: ${{ secrets.PRIVATE_KEY }}
# Filename of the private key.
# Optional. Default to `id_rsa`
private-key-name: id_rsa
# The SSH configuration. Content of `~/.ssh/config` file.
# Optional.
ssh-config: ${{ secrets.SSH_CONFIG }}
# Content of `~/.ssh/known_hosts` file. The public SSH keys for a
# host may be obtained using the utility `ssh-keyscan`.
# Required.
known-hosts: ${{ secrets.KNOWN_HOSTS }}
```
You can use run this action multiple times to install more than one key as long as you use different key names.
## License
The scripts and documentation in this project are released under the [MIT License](LICENSE).