You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@mina.apache.org by Ramakanth MS <ra...@gmail.com> on 2012/12/05 01:55:40 UTC
SSHD on port 22
Hi,
I am trying to implement Apache Mina (SSHD) as a SSH for our product on a
linux OS. Mina SSHD will replace the native SSH and listen on port 22. I
have tried setting the port as 22 and start the SSHD Server, results in a
PermissionDenied Exception. This is due to the port number < 1024 and
requires root access.
One of the way of working around this is to have a port redirection say, 22
to 45000. Are there any other mechanisms using which I can have Mina SSHD
to use/listen on port22
Appreciate any help/pointers
Thanks,
Ramakanth
Re: SSHD on port 22
Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 12/10/12 11:27 AM, Ramakanth MS a écrit :
> Yes its a restriction from the OS, I will have to start the process as
> root which is unfortunately not an option from security point of view.
sudo <your program>.
This is a perfectlya cceptable solution, even from the security pov.
>
> To overcome the problem, I have tried re-directing the port 22 to
> 45000 (using iptables) and it worked. But my concern is that I have to
> add 45000 to the firwall file to get it working.
Hence the sudo.
Most of your service running on your machine are started with a user
that is not root but still, they can use a priviledged port (below 1024)
because they are started using sudo.
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com
Re: SSHD on port 22
Posted by Ramakanth MS <ra...@gmail.com>.
Yes its a restriction from the OS, I will have to start the process as
root which is unfortunately not an option from security point of view.
To overcome the problem, I have tried re-directing the port 22 to
45000 (using iptables) and it worked. But my concern is that I have to
add 45000 to the firwall file to get it working.
Acc to my understanding, 45000 is an internal port and shouldn't have
to be added to the firewall file.
I guess slightly offbeat from the apache mina framework. Am I missing
something here?
Appreciate any help.
Thanks
On Wed, Dec 5, 2012 at 6:25 AM, Ramakanth MS <ra...@gmail.com> wrote:
> Hi,
>
>
>
> I am trying to implement Apache Mina (SSHD) as a SSH for our product on a
> linux OS. Mina SSHD will replace the native SSH and listen on port 22. I
> have tried setting the port as 22 and start the SSHD Server, results in a
> PermissionDenied Exception. This is due to the port number < 1024 and
> requires root access.
>
>
> One of the way of working around this is to have a port redirection say,
> 22 to 45000. Are there any other mechanisms using which I can have Mina
> SSHD to use/listen on port22
>
> Appreciate any help/pointers
>
> Thanks,
> Ramakanth
>
--
Regards
Ramakanth
Re: SSHD on port 22
Posted by Guillaume Nodet <gn...@gmail.com>.
Isn't that restriction an OS thing ? Maybe you need to run the java process
as root to be allowed to bind to port 22 ?
On Wed, Dec 5, 2012 at 1:55 AM, Ramakanth MS <ra...@gmail.com> wrote:
> Hi,
>
>
>
> I am trying to implement Apache Mina (SSHD) as a SSH for our product on a
> linux OS. Mina SSHD will replace the native SSH and listen on port 22. I
> have tried setting the port as 22 and start the SSHD Server, results in a
> PermissionDenied Exception. This is due to the port number < 1024 and
> requires root access.
>
>
> One of the way of working around this is to have a port redirection say, 22
> to 45000. Are there any other mechanisms using which I can have Mina SSHD
> to use/listen on port22
>
> Appreciate any help/pointers
>
> Thanks,
> Ramakanth
>
--
------------------------
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
FuseSource, Integration everywhere
http://fusesource.com