Auto-mount SFTP share in fstab

8,290

Try to use RSA keys instead of passwords

  1. Generate RSA keys on the server
  2. Copy to client
  3. use the rsa key instead of a password
Share:
8,290

Related videos on Youtube

Kamiz
Author by

Kamiz

Updated on September 18, 2022

Comments

  • Kamiz
    Kamiz almost 2 years

    I have a SFTP share on my server wich use standard authentication. On my client, I have edited the /etc/fstab file and added :

    [email protected]:/ /mnt/share fuse.sshfs port=22,defaults,_netdev   0   0
    

    I mount the share with the command : mount /mnt/share, and I indicates the password.

    My question : I have noticed that the share is not mounted permanently. Then, is it possible to mount this share automatically without having to fill in the password each time ?

    Thanks you

  • Kamiz
    Kamiz about 8 years
    Ok, but did I'd have to add the passphrase before each mount ?
  • stambata
    stambata about 8 years
    When you create a private/public key pair you have option do not enter a passphrase.