Menu

Scheduled Backups stores clear SSH connexion password

Virtualmin
marc pops
2019-08-12
2021-03-05
  • marc pops

    marc pops - 2019-08-12

    Hi,
    After years of using it, I've found that each Scheduled Backup create one text file with all the SSH connexion informations in clear text in /etc/webmin/virtual-server/backups
    I'm on Centos7.6 and I've chosen "Only store hashed password".
    Why is it like that?
    Thanks

     
  • Ilia

    Ilia - 2019-08-16

    Hi, Marc.

    The reason is that you need to deal with passwords in non-interactive way and it's getting authenticated as:

    ssh://root:password@192.168.122.2:/tmp/backup
    

    Remote SSH client just needs to know the password as it is.

    Using password for SSH not considreded to be a good practice. I would recommend generating the keys that could be used particularly for the given server's backup, with particular (non-su user) for the most security. However, if your system is compromised and your private key is possessed, it wouldn't matter whether you're using password authentication or not.

     
  • Norman Henderson

    Old post however, @rostovtsev : In the Webmin Scheduled Backup page, I want to send backups to a different server via scp, using an account that can only connect using an ssh key pair. The page has a space for username and password, how can I store the private key? The account only exists on the server not on the webmin (client). I tried putting the key in /root/.ssh and also tried creating the account on the client and putting it in /home/accountname/.ssh but Webmin does not pick that up. Thank you in advance.

     
  • Ilia

    Ilia - 2021-03-05

    I would suggest:

    1. Checking permissions on newly created ~/.ssh (700) and files in it (600)
    2. Checking that at first you can connect using key from source to target server using console
    3. Checking logs for and/or enabling debug logging for SSH for getting a clearer picture

    Note: Omit entering password when using the key.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.