Editing sshd_config

I’m trying to edit the sshd_config file (on an Ubuntu server) that’s in the etc/ssh folder. I’m using FileZilla to change the ports but no matter what I do it won’t except the changes. What am I doing wrong?

I get an error saying:

Error: /etc/ssh/sshd_config: open for write: permission denied
Error: File transfer failed

I’ve tried changing the permission to 777 but that doesn’t work either

You need to be user root to edit sshd_config file.

On terminal, run

sudo nano /etc/ssh/sshd_config

After editing, restart ssh

Thanks, I’ve done most of that now but how do I restart the ssh?


service sshd restart