Ssh : Add ssh_keygen function.

This commit is contained in:
Dmitry Voronin 2024-03-09 19:30:13 +03:00
parent d2b04dfeeb
commit 9e9dbc8591
2 changed files with 7 additions and 5 deletions

View file

@ -1,7 +1,12 @@
# Mount FS over ssh. Just extra config for sshfs.
# Usage: sshmount <REMOTE> <LOCAL>
function sshmount() {
# Usage: ssh_mount <REMOTE> <LOCAL>
function ssh_mount() {
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

View file

@ -22,9 +22,6 @@ Host home
HostName 192.168.1.2
User root
Port 22143
ControlPath ~/.ssh/S.%r@%h:%p
ControlMaster auto
ControlPersist 15m
Host laptop
Hostname 192.168.1.9