Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

Yes, that's exactly it.

My authorized_keys line looks like this:

  command="${HOME}/bin/fromvm vmname",no-port-forwarding,no-x11-forwarding,no-agent-forwarding ssh-ed25519 ...
I give each of my VMs a different name and key, which lets me identify them for the purpose of e.g. constructing ssh:// links for remote editing.

The actual script uses $SSH_ORIGINAL_COMMAND, exactly as you've described, which means that while the guest thinks its executing e.g. "pbcopy", the host "fromvm" script is actually receiving "pbcopy" in the $SSH_ORIGINAL_COMMAND and can apply the appropriate access control or restrictions.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: