1

I recently setup an Ubuntu virtual machine on Azure. I can access that machine via SSH. I'm trying to copy a bash script I have in my browser window. I want to paste that into a file on my virtual machine. In an attempt to do that, I created a new file on my Ubuntu virtual machine using Nano. I then tried to copy-and-paste however the script that I've copied isn't getting pasted.

I'm accessing the virtual machine via SSH via the Bash shell on Windows 10. Is there a way to copy-and-paste? if so how? If not, can someone please recommend how I might be able to get the bash script I want into the virtual machine without manually typing the whole thing?

Thanks!

  • paste to console is with ctrl+shift+v did you try that? – mondjunge Sep 20 '17 at 15:12
  • I did. That did not work. However, there is a paste option in the bash shell app menu. I didn't see that there. – Zach Templeton Sep 20 '17 at 15:57
  • @ZachTempleton If you've solved copy and paste via clipboard can you post an answer and accept it? – WinEunuuchs2Unix Oct 7 '17 at 23:35
0

I don't know which virtual machine software you are using but in Oracles's Virtualbox you have to enable a share clipboard folder option. You can see how to do it here.

Another option is to use winscp. If you are familiar with scp command in linux is exactly that with a gui interface. This way you can transfer files via ssh. Open winscp and connect just as you were ssh'ing. You can modify your files locally and then transfer them to your virtual machine.

Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.