Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
ssh-ca
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nimrod
ssh-ca
Commits
871acdcc
Commit
871acdcc
authored
9 years ago
by
nimrod
Browse files
Options
Downloads
Patches
Plain Diff
-Corrected the code block markup.
parent
8cf3e34c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.rst
+28
-16
28 additions, 16 deletions
README.rst
with
28 additions
and
16 deletions
README.rst
+
28
−
16
View file @
871acdcc
...
...
@@ -7,7 +7,7 @@ and hosts.
Installation
------------
::
.. code:: shell
git clone https://www.shore.co.il/cgit/ssh-ca
cd ssh-ca
...
...
@@ -16,23 +16,33 @@ Installation
Usage
-----
To start a new certificate authority::
To start a new certificate authority
.. code:: shell
ssh-ca init
To sign a user's public key::
To sign a user's public key
.. code:: shell
ssh-ca signuser username
To sign a hosts's public key::
To sign a hosts's public key
.. code:: shell
ssh-ca signhost hostname
To generate a new keypair for a host with a signed public key::
To generate a new keypair for a host with a signed public key
.. code:: shell
ssh-ca newhost hostname
To generate a new keypair for a user with a signed public key::
To generate a new keypair for a user with a signed public key
.. code:: shell
ssh-ca newuser username
...
...
@@ -40,22 +50,23 @@ Authenticating hosts
--------------------
#. Sign the server's public key or generate a new pair and copy the files over.
#. Add the following line to `/etc/ssh/sshd_config`::
#. Add the following line to
:code:
`/etc/ssh/sshd_config`::
HostCertificate /path/to/the/signed/public/key
#. Add a line to your `known_hosts` file to authorize signed public keys to a
specific top level domain. For example if your domain is example.com and the
contents of `CA.pub` is::
specific top level domain. For example if your domain is example.com and the
contents of
:code:
`CA.pub` is::
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC2fAkeidfnPn712B4uW3XhKyFt9FcJtVwSPKDSCykULg3X5gVV/Xa1yb4ameY3ihXOqQOlG3YpYnOQ8KdM67WtnERVbTJIfieRjGzoURz9NquLFXSKsuQrXMWRNHqXAHw7VirPvKL4cSc4l00Az1HDnHhMIclPY8G+8SkRIRsTwwwa5QjGF2wuhC6j5UHJSaF7qLFw9FSaCsEJTkQxtCD4+Rd/dxv3kVWSkm5DbNG0z3QHyISW7XDvyXP+1ccSb5+IWC0yQCT4OJNFUMDb+SdD7AzDHfI9Z5zTp56uGV23lywWhSvv20UPA0SyXJNGPOw7uJ1ak8q4SBh60PtOENQf ssh-ca
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC2fAkeidfnPn712B4uW3XhKyFt9FcJtVwSPKDSCykULg3X5gVV/Xa1yb4ameY3ihXOqQOlG3YpYnOQ8KdM67WtnERVbTJIfieRjGzoURz9NquLFXSKsuQrXMWRNHqXAHw7VirPvKL4cSc4l00Az1HDnHhMIclPY8G+8SkRIRsTwwwa5QjGF2wuhC6j5UHJSaF7qLFw9FSaCsEJTkQxtCD4+Rd/dxv3kVWSkm5DbNG0z3QHyISW7XDvyXP+1ccSb5+IWC0yQCT4OJNFUMDb+SdD7AzDHfI9Z5zTp56uGV23lywWhSvv20UPA0SyXJNGPOw7uJ1ak8q4SBh60PtOENQf ssh-ca
Then the line will be::
@cert-authority *.example.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC2fAkeidfnPn712B4uW3XhKyFt9FcJtVwSPKDSCykULg3X5gVV/Xa1yb4ameY3ihXOqQOlG3YpYnOQ8KdM67WtnERVbTJIfieRjGzoURz9NquLFXSKsuQrXMWRNHqXAHw7VirPvKL4cSc4l00Az1HDnHhMIclPY8G+8SkRIRsTwwwa5QjGF2wuhC6j5UHJSaF7qLFw9FSaCsEJTkQxtCD4+Rd/dxv3kVWSkm5DbNG0z3QHyISW7XDvyXP+1ccSb5+IWC0yQCT4OJNFUMDb+SdD7AzDHfI9Z5zTp56uGV23lywWhSvv20UPA0SyXJNGPOw7uJ1ak8q4SBh60PtOENQf ssh-ca
#. You can also add it system wide by adding the above line to
`/etc/ssh/ssh_known_hosts` and the following line to your `ssh_config` file::
:code:`/etc/ssh/ssh_known_hosts` and the following line to your
:code:`ssh_config` file::
GlobalKnownHostsFile /etc/ssh/ssh_known_hosts
...
...
@@ -67,21 +78,22 @@ Authenticating users
--------------------
#. Sign the user's public key or generate a new pair and copy them over.
#. Copy CA.pub over to the host.
#. Add the following line to `/etc/ssh/sshd_config`::
#. Copy
:code:`
CA.pub
`
over to the host.
#. Add the following line to
:code:
`/etc/ssh/sshd_config`::
TrustedUserCAKeys /path/to/CA.pub
Development
-----------
To ease development
`
`make clean`
`
and
`
`make test`
`
are available.
It's
recommended to add
`
`make test`
`
to your git pre-commit hook.
To ease development
:code:
`make clean` and
:code:
`make test` are available.
It's
recommended to add
:code:
`make test` to your git pre-commit hook.
License
-------
This software is licnesed under the MIT licese (see the ``LICENSE.txt`` file).
This software is licnesed under the MIT licese (see the :code:`LICENSE.txt`
file).
Author
------
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment