Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
johnguo
Employee
Employee

Modify sshd_config in R81

In R81 sshd_config is replaced after each reboot. You need to do the following to make your changes permanent and survive reboot

Steps:
vi /etc/ssh/templates/sshd_config.templ (Make your changes)
/bin/sshd_template_xlate < /config/active
service sshd reload

Example:
sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/templates/sshd_config.templ
sed -i 's/PermitRootLogin forced-commands-only/PermitRootLogin yes/' /etc/ssh/templates/sshd_config.templ
/bin/sshd_template_xlate < /config/active
service sshd reload

 

 

3 Replies
PhoneBoy
Admin
Admin

That suggests there is some config we can change via clish/WebUI now…will have to look.

0 Kudos
Srdjan_B
Contributor

OK, you've got me confused. I would say you cannot edit binary file with vi editor 😀


@johnguo wrote:

vi /bin/sshd_template_xlate (Make your changes)


But your example works like a charm. 👍

One more thing, this is not only for R81, it seems to be the case for R80.40 JHF T83 (at least the blink image dated Dec 9th used in AWS China).

0 Kudos
Tobias_Moritz
Advisor

In the mean time, sk106031 was updated with the new procedure for R81, R80.40 JHF T83 and above:

# vi /etc/ssh/templates/sshd_config.templ

...

# /bin/sshd_template_xlate < /config/activ

# service sshd restart

0 Kudos