Isn't sshkey from vm back to host a security risk?
That means that if someone got access to my vm then they can automatically get into my host doesn't it?
If so what is a better alternative? I want to be able to automount my sshfs shared folders on the vm from host on boot but the stuff I read said you need sshkeys for that.
I am taking the same security protocols on the guest as I would on the host so I suppose it isn't any more vulnerable to attack than the host but still..wondering what the correct protocol is in this situation.
I ask because I was reading the sshfs archwiki and it said to use keys in order to setup the fstab for automounting.
About this post
- Posted
- Archived
- Score
- 6 · 100% up
- Kind
- Text
- ID
- 5316bm
17 comments
You can restrict an account to only sshfs and to only certain directories.
ah cool hadn't thought of that. So then would the sshkey only be valid for that user rather than valid for anyone using that machine to login?
What should I look in order to set that up re the relevant info.
SSH forced commands. You lock down the key to only run a specific command on the receiving end.
You can also restrict the commands you can run when logging in with a certain ssh key.
Why not use NFS?
I don't have a preference I just read all of them in the wiki and happened to choose sshfs since I've used ssh and so thought I might be more familiar with the syntax. Is it easier to use nfs?
Sshfs is pretty much the easiest network filesystem, but it is also slower and less configurable than NFS. It's worth checking out if you are interested.
Why do you want to do this? Just create a shell script to mount the shared folders, and run the script using sudo after you ssh in.
Oh didn't think of that but I still prefer not to have to have to type password everytime. altho not so bad if I am in ssh and can c + p rather than having to type in the console.
I use libvirt with p9
Weird. Why is the syntax set out like web page code?
The configuration for libvirt is stored in XML which resembles HTML. You can use a GUI frontend such as
virt-managerto avoid editing the XMLs by hand :) EDIT: GUI example