Q:

Visudo Command Not Working on Sudo User

I recently bought a vps and I have am fairly new to using ubuntu on it since I have always used shared hosting. 
I have created a sudoer user and it worked perfectly fine yesterday except when I edited the ssh/ssh_config file to disable password authentication, it did not work, and I decided to work on it tomorrow. 
I stopped my server, and when I booted it up today, and tried the command sudo visudo /etc/ssh/ssh_config it would just put display 
usage: visudo [-chqsV] [-f sudoers] [-x file]

rather than opening up the file. 
I know it is something wrong about my usage but I can't seem to figure it out, I did the same exact command yesterday and it worked perfectly fine.

A:

The command to edit a file using sudo is sudoedit:
sudoedit /etc/ssh/sshd_config

Equivalently, you can also do:
sudo -e /etc/ssh/sshd_config

visudo, as already noted, is specifically meant for editing sudoers files. It performs syntax checking assuming the file is a sudoers file. You don't want to use it to edit other files.

