Cynosure.X International

: :

Add Comment | Related Links | TrackBack
Related Content

Grant Authorized Key (GPL)

"GrantAuthorizedKey.sh" is a Bourne shell script that can automatically grant remote access into your account temporarily. Calling "GrantAuthorizedKey.sh" with a public key file as its argument would insert that public key into your ".ssh/authorized_keys" file. Then you can use the companion "RevokeAuthorizedKey.sh" script to remove the authorization. These two scripts are extremely useful in situations where your custom script must log into a remote computer and then grab some files or do something on your execution host.

When "GrantAuthorizedKey.sh" successfully inserts a public key into the authorized_key file, it outputs the name of the public key. You can pass this name to the "RevokeAuthorizedKey.sh" to remove the key from the authorized_key file.

"GrantAuthorizedKey.sh" takes advantage of the following shell scripts, which are also available on this site. So to use the this script, you will need to download those script if you don't already have them.

GetTempPathName.ksh
RevokeAuthorizedKey.sh
Token.sh

"GrantAuthorizedKey.sh" is distributed as executable source code under the GNU General Public License. Please see the license agreement elsewhere on this site.

Usage

GrantAuthorizedKey.sh "public key file"

On success, this script outputs the key name that can
be used to revoke the public key (see
RevokeAuthorizedKey.sh). On failure, this script outputs
an error message that is prefixed with "Error:".
Therefore, you can use the prefix to test for success or
failure.

Attached File: GrantAuthorizedKey.sh (1 KB)

Chieh Cheng
Sat, 20 Jun 2009 03:30:42 +0000

Add Comment | Related Links | TrackBack
Related Content

Did your message disappear? Read the Forums FAQ.

TrackBack

Send Ping | TrackBack URL | Spam Control

Title: Revoke Authorized Key (GPL)
Weblog: Cynosure.X International
Excerpt: "RevokeAuthorizedKey.sh" is a Bourne shell script that can automatically revoke remote access into your account. Calling "RevokeAuthorizedKey.sh" with a public key name as its argument would remove that public key from your ".ssh/authorized_keys" file. You can use this script as a stand-alone utilit . . .
Tracked: Sat, 20 Jun 2009 03:33:14 +0000

Add Comment

Spam Control | * indicates required field
Your Name: *
E-mail:
Remember Me!
Comment: *
File attachment is optional. Please do not attach a file to your submission unless it is relevent.
Attach File:
(20 MB Max)
Spam Protection: * Answer of 4 - 0?
Click button only once, please!

Messages, files, and images copyright by respective owners.

Products | Services
Forums | Latest | RSS
Library | Search | Wiki
Help | Licenses

Login | Register

Hacking Digital Cameras
Fun for Photographers


Amazon Associate

Copyright © 1996 - 2017. All Rights Reserved.