Red Squirrel
No Lifer
I recently switched to Linux as my desktop OS and I was thinking it would be a cool idea to setup public keys with all my servers so I can SSH to them without typing a password. but then I got thinking, if my machine was to by chance get hit with a virus or something, would this virus then be able to also access those servers without a password?
If yes, is there a certain way of setting this up so it's secure? I'm thinking of just creating another user and setup the public keys with that user instead of my main user so I just need to su as that user if I plan to login to my servers or run scripts that need to scp/rsync stuff etc, that way if I was to get a virus or something it would be running as my main user and not this special user so the keys would not apply. Is this a good way of doing it? Or is there a better way?
I could setup a passphrase, but it kinda defeats the purpose as I'd still have to enter a password everytime, so may as well just login normally.
If yes, is there a certain way of setting this up so it's secure? I'm thinking of just creating another user and setup the public keys with that user instead of my main user so I just need to su as that user if I plan to login to my servers or run scripts that need to scp/rsync stuff etc, that way if I was to get a virus or something it would be running as my main user and not this special user so the keys would not apply. Is this a good way of doing it? Or is there a better way?
I could setup a passphrase, but it kinda defeats the purpose as I'd still have to enter a password everytime, so may as well just login normally.
Last edited: