This repository has been archived by the owner on Apr 29, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
33 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
#!/bin/bash | ||
|
||
# Get rid of any certs older than 2 weeks | ||
# Get rid of any cert files older than 2 weeks | ||
|
||
find /certs -type f -name 'x509_*' -mtime +14 -exec rm {} \; | ||
limit=14 | ||
|
||
find /certs -type f -name '*.key' -mtime +$limit -exec rm {} \; | ||
find /certs -type f -name '*.key-cert.pub' -mtime +$limit -exec rm {} \; | ||
find /certs -type f -name '*.key.pub' -mtime +$limit -exec rm {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
#!/bin/bash | ||
|
||
# Test a user's ability to gsissh in. | ||
# Test user's ability to ssh | ||
|
||
username=$1 | ||
cert=/certs/x509_$username | ||
cert=/certs/$username.key | ||
echo $username $cert | ||
if [ ! -f $cert ]; then | ||
echo " ... no cert for $username" | ||
exit 1 | ||
fi | ||
export X509_USER_CERT=$cert | ||
export X509_USER_KEY=$cert | ||
gsissh \ | ||
-o StrictHostKeyChecking=no \ | ||
-l $username \ | ||
-p 2222 cori19-224.nersc.gov | ||
/usr/bin/ssh \ | ||
-i $cert \ | ||
-l $username \ | ||
-o PreferredAuthentications=publickey \ | ||
-o StrictHostKeyChecking=no \ | ||
-p 22 \ | ||
cori19-224.nersc.gov |