0

When I try to run ssh service in xinetd with customized port (port=2211) it shows me this error:

xinetd[16783]: Service ssh expects port 22, not 2211

If I change port to 22 in xinetd it works fine but how can I customize to use my port in xinetd?

Mojtaba Rezaeian
  • 451
  • 5
  • 14

2 Answers2

1

You'll need to make some modifications to the xinetd configuration - this is dealing with it on MacOS, but it's very similar.

You can go and modify the /etc/services file and change the port there, but it's probably better to create/modify an /etc/xinetd.d/ssh file and make sure to specify:

  • "-p XXX"
  • "port = XXX"
  • "type = unlisted"
Ackack
  • 989
  • 5
  • 11
0

However @tilleyc posted the correct answer in the mean time, before getting his answer I finally solved this problem by modifying ssh port in /etc/services from 22 to 2211 and everything get worked fine after this change.

I'll mark his answer correct but keep note that reason for this error is because of linux default service ports set in this file: /etc/services

Mojtaba Rezaeian
  • 451
  • 5
  • 14