Ssh : Add ssh_keygen function.
This commit is contained in:
parent
d2b04dfeeb
commit
9e9dbc8591
|
@ -1,7 +1,12 @@
|
||||||
# Mount FS over ssh. Just extra config for sshfs.
|
# Mount FS over ssh. Just extra config for sshfs.
|
||||||
# Usage: sshmount <REMOTE> <LOCAL>
|
# Usage: ssh_mount <REMOTE> <LOCAL>
|
||||||
function sshmount() {
|
function ssh_mount() {
|
||||||
sshfs -o uid=${UID},auto_unmount "${@}"
|
sshfs -o uid=${UID},auto_unmount "${@}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Generate private an public keys on a local host and print a public key.
|
||||||
|
function ssh_keygen() {
|
||||||
|
ssh-keygen -f ~/.ssh/key && cat ~/.ssh/key.pub
|
||||||
|
}
|
||||||
|
|
||||||
complete -o nospace -F _sshfs sshmount
|
complete -o nospace -F _sshfs sshmount
|
||||||
|
|
|
@ -22,9 +22,6 @@ Host home
|
||||||
HostName 192.168.1.2
|
HostName 192.168.1.2
|
||||||
User root
|
User root
|
||||||
Port 22143
|
Port 22143
|
||||||
ControlPath ~/.ssh/S.%r@%h:%p
|
|
||||||
ControlMaster auto
|
|
||||||
ControlPersist 15m
|
|
||||||
|
|
||||||
Host laptop
|
Host laptop
|
||||||
Hostname 192.168.1.9
|
Hostname 192.168.1.9
|
||||||
|
|
Loading…
Reference in a new issue