Bash: ssh-key function.
This commit is contained in:
parent
cd087cd73a
commit
c83b3a03a8
@ -88,6 +88,10 @@ Get gzipped file size.
|
||||
|
||||
Test if HTTP compression (RFC 2616 + SDCH) is enabled for a given URL. Send a fake UA string for sites that sniff it instead of using the Accept-Encoding header.
|
||||
|
||||
### ssh-key
|
||||
|
||||
Copy public SSH key to clipboard. Generate it if necessary.
|
||||
|
||||
### add-ssh-host <username> <hostname> <identifier>
|
||||
|
||||
Create an SSH key and uploads it to the given host.
|
||||
|
@ -80,6 +80,17 @@ function nyan() {
|
||||
echo
|
||||
}
|
||||
|
||||
# Copy public SSH key to clipboard. Generate it if necessary
|
||||
ssh-key() {
|
||||
file="$HOME/.ssh/id_rsa.pub"
|
||||
if [ ! -f "$file" ]; then
|
||||
ssh-keygen -t rsa
|
||||
fi
|
||||
|
||||
cat "$file" | c
|
||||
echo "Your public key copied to clipboard."
|
||||
}
|
||||
|
||||
# Create an SSH key and uploads it to the given host
|
||||
# Based on https://gist.github.com/1761938
|
||||
add-ssh-host() {
|
||||
|
Loading…
Reference in New Issue
Block a user