Editing files in Ubuntu thru WinSCP
I wasn’t born to edit configuration files using CLI. Although nano usually saves the day, I still love the syntax highlighting of notepad++.
Maybe this is because I grew of working on Windows.
But how do you edit config files in a remote Ubuntu server from my Windows desktop? I know I’ve tried that before but it usually involves using a root account to work around the permission issues.
Fortunately I came across this post.
Just to make sure I had it recorded, these are the steps I did:
- SSHed to
192.168.x.x - Edited the sudoer file:
sudo nano /etc/sudoers -
Added the following at the end of the file:
###added by ghelo 03 nov 2014 systems1 ALL=NOPASSWD: /usr/lib/openssh/sftp-server - Launched WinSCP in the remote client
- Entered login credentials as we normally would
- In the advanced button, clicked SFTP and entered
sudo /usr/lib/openssh/sftp-serverin the Protocol options > SFTP server - Click Login
- Done
After doing the steps above, I can now edit the remote server files using Notepad++ sans permission problem.
Happiness!!!