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. # 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

View file

@ -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