Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vagrant: How to paste text in Windows command window, when running Vagrant ssh

How can I copy and paste stuff into Windows command window, which runs Vagrant ssh in it? Right mouse button is then somehow blocked

like image 878
d-ph Avatar asked May 26 '14 14:05

d-ph


People also ask

How do I paste into Windows SSH?

hit Ctrl + V on the keyboard. use the keyboard to access the context menu's Edit > Paste option: Alt + Space , then E , then P. if the "Use Ctrl+Shift+C/V as Copy/Paste" option is activated, hitting Ctrl + Shift + V on the keyboard.

What does the vagrant ssh command do?

Command: vagrant ssh [name|id] [-- extra_ssh_args] This will SSH into a running Vagrant machine and give you access to a shell. On a simple vagrant project, the instance created will be named default.


3 Answers

The windows terminal is awful. To paste, what you need to do is right-click the top-left corner of the window (where the icon is), go down to edit, and select "Paste". No keyboard shortcuts for it.

Now, one alternative is to connect to your vagrant VM with something like Putty. Just connect to localhost on port 2222. username is "vagrant" but you will need to take a few steps to convert the SSH key for login. Here is an article explaining what you need to do.

like image 72
noeldiaz Avatar answered Oct 22 '22 03:10

noeldiaz


An easiest shortcut would be:

1) Go to your vagrant vm

-> vagrant ssh

2) Set password to your vagrant user

sudo passwd vagrant

Enter new UNIX password: 12345

Retype new UNIX password: 12345 passwd: password updated successfully

3) Login using Putty :

Host name: localhost Port: 2222 (or your vagrant vm mapped ssh port)

username: vagrant

password: 12345

Enjoy!

like image 38
Srbgupta Avatar answered Oct 22 '22 03:10

Srbgupta


On Windows 10:

  1. Right-click on the terminal menu title.
  2. Click Properties
  3. Check Options > Edit Options > Use Ctrl+Shift+C/V as Copy/Paste
like image 36
Jon Portella Avatar answered Oct 22 '22 02:10

Jon Portella