I'm running EXS server 3.0.2 and i need to edit the following files from the console.
1. Edit the /etc/ssh/sshd_config file
2. Edit the /etc/ssh/sshd_config file
What commands do I use to do this?
Thanks.
you want to hit "i" to put it into insert mode, that will allow you to make modifications (i'm assuming to the allowrootlogin=yes)
when you have made the change hit esc to take you out of insert mode, then type ":wq" which will write(save)/quit
if you know you have made the changes and you want to just save/quit without any prompts are you sure, just type ":wq!"
Kyle
You can use vi , once in the file i will put you in insert mode, then when your done making changes hit esc and type :wq to save your changes and quit
for more info on the command you can type man vi
but before you make any changes you may want to make a backup copy using cp src dst
hth
Andy
Well I think the files you listed are the same files.. but you would use an editor like vi or nano
I use vi so it would look sometime like this:
vi /etc/ssh/sshd_config
or
nano /etc/ssh/sshd_config
- Kyle
nano is simpler.
- just type : nano /etc/ssh/sshd_config
- make your modification
- save with ctrl+o
- press enter
- exit with ctrl+x
Ok we are making progress. Im new to vi editor once I've located what I want to change in a file (in this case a no to a yes), how do I do it?
you want to hit "i" to put it into insert mode, that will allow you to make modifications (i'm assuming to the allowrootlogin=yes)
when you have made the change hit esc to take you out of insert mode, then type ":wq" which will write(save)/quit
if you know you have made the changes and you want to just save/quit without any prompts are you sure, just type ":wq!"
Kyle
Thanks Kyle. You assumed correctly about what I was editing.
one thing to add. After you change the allow root login to yes and exit out of the editer, restart the sshd service, to allow it to take affect without rebooting
service sshd restart