Just install ssh on your vm and use ubuntu's copy paste naturally. It's the same thing as using aws from terminal
https://hostman.com/tutorials/how-to-install-and-configure-ssh-on-ubuntu-22-04/