2024-10-11 23:27:07 +03:00
|
|
|
{ ... }:
|
|
|
|
{
|
|
|
|
text = ''
|
|
|
|
# Mount FS over ssh. Just extra config for sshfs.
|
|
|
|
# Usage: ssh_mount <REMOTE> <LOCAL>
|
|
|
|
function ssh_mount() {
|
|
|
|
sshfs -o uid=''${UID},auto_unmount "''${@}"
|
|
|
|
}
|
2024-04-06 03:03:58 +03:00
|
|
|
|
2024-10-11 23:27:07 +03:00
|
|
|
# Mount FS over ssh. Just extra config for sshfs.
|
|
|
|
# Usage: ssh_mount <REMOTE> <LOCAL>
|
|
|
|
function ssh_mount_ro() {
|
|
|
|
sshfs -o uid=''${UID},auto_unmount,ro "''${@}"
|
|
|
|
}
|
2024-04-06 03:03:58 +03:00
|
|
|
|
2024-10-11 23:27:07 +03:00
|
|
|
# Generate private an public keys on a local host and print a public key.
|
|
|
|
function ssh_keygen() {
|
|
|
|
ssh-keygen && cat ~/.ssh/*.pub
|
|
|
|
}
|
2024-04-06 03:03:58 +03:00
|
|
|
|
2024-10-11 23:27:07 +03:00
|
|
|
complete -o nospace -F _sshfs sshmount
|
|
|
|
'';
|
2024-04-06 03:03:58 +03:00
|
|
|
}
|