Koozali.org formerly Contribs.org
Other Languages => Deutsch => Topic started by: lancelott2 on February 28, 2017, 07:01:14 PM
-
Hallo,
ich habe versucht den Port in der SSH_config auf den eingestellten Port 22xx umzustellen.
Leider funktioniert das Folgende nicht:
db configuration setprop sshd TCPPort 2268
signal-event remoteaccess-update
Auch das Kopieren der Templates-Custom hat nicht funktioniert.
Deshalb nun meine Frage, wie kann ich den Port in der Datei SSH_config ändern?
und macht man das überhaupt noch?
Grüße und vorab Danke!
-
Did you try 'service sshd restart' after changing the port with the db command so the ssh daemon picks up on the new configuration?
-
Did you try 'service sshd restart' after changing the port with the db command so the ssh daemon picks up on the new configuration?
it should be executed during the remoteaccess-update event..
-
Aktually i dont know how i have to copy the config-files into the config-custom folder, because if i use the directory, it doesnt work, and it doesnt take over the new settings.
For the normal copy of the folder i tryed both of it.
But maybe you can tell me how i must copy the template, then i can try it again.
Thanks a lot ;)
-
Lancellot2, since you can write in english, would you mind to open a new topic in SME9.X section explaining the thing?
thank you
-
Oh, i allready found the fault i did ....
I tryed before ... expand-template /etc/ssh_config ... doesnt work - cos of the subfolders ...
now i tryed ... expand-template /etc/ssh/ssh_config
and it worked .... :D
-
Still I do not understand why you need a custom template fragment. It should work as simple as changing the port via the db command and signal-event remotate-access update.
-
sshd port can be set via server-manager, even easier :-)
-
Setting the Port up works, the Port work for SSH ...
but in the Config-File it doesnt change, there is still 22 till you change the the Template-File.
I tryed also,
db configuration setprop sshd TCPPort 22xx
signal-event remoteaccess-update
but it didnt effect the config file ... finaly i copyed and changed the templates
nano /etc/e-smith/templates-custom/etc/ssh/ssh_config/10Port
nano /etc/e-smith/templates-custom/etc/ssh/sshd_config/10Port
And expand them with
expand-template /etc/ssh/ssh_config
and that worked and changed the port in the config file :)
I changed it for Denyhosts SSH
-
Something is odd.... the /etc/ssh/ssh_config does not get updated/expanded when changing the ssh port in server manager.
-
Something is odd.... the /etc/ssh/ssh_config does not get updated/expanded when changing the ssh port in server manager.
It shouldn't as it has nothing to do with sshd.
It sets defaults for ssh connections going out.
https://linux.die.net/man/5/ssh_config