Monday, November 30, 2015

Connecting to vagrant using NppFTP and Notepad++

Notepad++ comes with a great plugin to enable editing remote files or files on virtual boxes.  It can be a bit of a mystery to setup.  I'll explain what I do to allow editing on a Vagrant box on your Windows PC.

  1. start vagrant using vagrant up
  2. start notepad++
  3. open the NppFTP plugin from the plugins menu.
  4. click on the setup gear and choose 'profile settings'
  5. click on the add new profile button
  6. give it a good name and click OK
  7. click on the connection tag
  8. enter the ssh port number your vagrant box is using, it'll be 2222 or a variant of that.
  9. enter these parameters:  
  10.    hostname:
  11.    connection type: SFTP
  12.    username: vagrant
  13.    uncheck 'ask for password'
  14. click on the Authentication tab
  15. check 'Try private key file authentication'
  16. click the '...' next to the 'Private key file' edit box.
  17. navigate in the file dialog to your Vagrant box location
  18. select this file: '.vagrant\machines\default\virtualbox\private_key'
  19. uncheck 'ask every time'
  20. click close

That should setup the connection.  Try it out by using the  icon.  Click on the  icon to see the log of NppFTP connection attempts.

1 comment: