18

I cannot use command+c/command+v on mac to copy paste text into my aws ec2 session window. How do I enable copy paste so that I can copy text from my local clipboard or from another window in ec2 session ?

I connected with "EC2 Instance Connect" from the console. Cmd-v just pastes a space.

11 Answers 11

16

To test this situation, I launched an Amazon EC2 Linux instance and connected via EC2 Instance Connect.

I had the same experience as you:

  • Highlighting text 'copies' it to the clipboard
  • Right-clicking 'pastes' the clipboard
  • However, copying to the clipboard outside of the window and then attempting to paste it didn't work

This was using Google Chrome.

I then tried again using Safari and it worked fine.

So, there seems to be some strange behaviour in some browsers.

4
  • 17
    I know this sounds weird but I have hit ctrl+V 2 or 3 times continuously and it works on Google chrome as well. Commented Aug 11, 2021 at 13:44
  • 2
    @VamshiSiddarth Same here, I can paste into vi or SQL editors fine, but pasting into the command line requires a double paste.
    – Daly
    Commented Oct 5, 2021 at 21:54
  • I connected through putty but not able to paste even after pressing multiple times
    – subhashis
    Commented Nov 1, 2021 at 14:14
  • 1
    after doing the double ctrl+v a few times, it started working properly; as in just pressing ctrl+v once would would ¯_(ツ)_/¯
    – Ben
    Commented Dec 22, 2021 at 18:53
9

In many terminals ctrl+c and ctrl+v will not work for copy & paste. In that case, you can use "ctrl+insert" for copy and "shift+insert" for paste, in some keyboard "insert" button won't work alone, in that time, you need to press "fn" also...

2

I had the same problem.This is what I did: ctrl+c the text or command you want to copy and then go to the terminal and press right click. it worked

1

I had the same issue. CTRL+V doesn't seem to work and double CTRL+V doesn't seem to work either.

What did work was right-click + paste

1

Copy: Ctrl + Insert

Paste: Shift + Insert

0

I had the same problem. When I would paste, it just added a space instead of the clipboard contents. Double-pasting didn't seem to work either.

This sounds weird but what worked for me was opening a new blank tab and pasting in the address bar. I had to re-copy the content (it seems like the clipboard had lost it?) But once it worked in the address bar, I switched tabs and it worked in my EC2 Connect Console.

YMMV.

0

I highlighted the text, then used my keyboard's menu button (located next to CTRL) to pop up the normal browser right-click menu... then clicked "copy"

0

I had the same issue with copying and pasting on my putty terminal (Mac M1). This is what I did:

  1. Bring up the putty window.
  2. On the left, you'll find list of categories to choose from. Click on "Selection" where you'll see list of selection settings you can modify.
  3. Change the settings below from "No action" to "PRIMARY" and try opening the terminal. Mouse Paste action: PRIMARY {Ctrl,Shift} + Ins: PRIMARY Ctrl+ +{C,V}: PRIMARY

Hope this helps!

0

The below works for me on my Windows 10 with Chrome browser

To Copy highlighted text from EC2 console to Clipboard:

Fn + Ctrl + Insert

To Paste from Clipboard to EC2 console at the cursor:

Fn + Shift + Insert

0

Ctrl + shift + v works for me from a Werd document to EC2 Instance Connect, PowerShell and the Windows Terminal app. Follow these directions https://www.minitool.com/news/how-to-paste-into-command-prompt.html to enable pasting in Command Prompt.

0

CTRL + SHIFT + V works from Windows using Chrome

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