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
55d19e46
Commit
55d19e46
authored
9 years ago
by
nimrod
Browse files
Options
Downloads
Patches
Plain Diff
Initial implementation, further testing is needed.
parent
758745e7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+3
-0
3 additions, 0 deletions
.gitignore
Makefile
+4
-2
4 additions, 2 deletions
Makefile
ssh-ca
+18
-4
18 additions, 4 deletions
ssh-ca
with
25 additions
and
6 deletions
.gitignore
+
3
−
0
View file @
55d19e46
...
...
@@ -2,3 +2,6 @@
*~
*.swp
*.swo
CA*
users/
hosts/
This diff is collapsed.
Click to expand it.
Makefile
+
4
−
2
View file @
55d19e46
...
...
@@ -5,7 +5,9 @@ install:
chmod
755 /usr/local/bin/ssh-ca
clean
:
rm
-rf
CA CA.pub
rm
-rf
CA CA.pub
users
hosts
test
:
clean
echo
Not implemented.
./ssh-ca init
./ssh-ca newuser john
./ssh-ca newhost www
This diff is collapsed.
Click to expand it.
ssh-ca
+
18
−
4
View file @
55d19e46
...
...
@@ -7,20 +7,31 @@ usage () {
}
init
()
{
echo
Initializing new CA.
mkdir
-p
hosts
users
ssh-keygen
-qf
CA
-P
/dev/null
ssh-keygen
-qf
CA
-P
""
-C
ssh-ca
}
signuser
()
{
echo
Not implemented.
echo
"Signing user
$1
key."
ssh-keygen
-s
CA
-I
"
$1
"
-n
"
$1
"
"users/
$1
.pub"
}
signhost
()
{
echo
Not implemented.
echo
"Signing host
$1
key."
ssh-keygen
-s
CA
-I
"
$1
"
-h
-n
"
$1
"
"hosts/
$1
.pub"
}
newhost
()
{
echo
Not implemented.
echo
"Creating new host
$1
keypair."
ssh-keygen
-qf
"hosts/
$1
"
-P
""
-C
"
$1
"
signhost
"
$1
"
}
newuser
()
{
echo
"Creating new user
$1
keypair."
ssh-keygen
-qf
"users/
$1
"
-P
""
-C
"
$1
"
signuser
"
$1
"
}
if
[
$#
-lt
1
]
...
...
@@ -42,6 +53,9 @@ case "$1" in
newhost
)
newhost
"
$2
"
;;
newuser
)
newuser
"
$2
"
;;
*
)
usage
exit
1
...
...
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