Setting up ssh telnet ftp port on two AIX servers at home in one internet network

Hello I have two AIX servers set up to the same internet at my home.
However, to be able to access those servers remotely i have to create a firewall entry of telnet port and ssh port in my router settings.

The issue that i am having is that i am only able to allocate ssh port to one of the servers, whereas i want to allocate ssh to both of the servers so both servers can be connected remotely via ssh.
Is that possible?

The router + modem device that is being used at my home is, Manufactured by 2wire and the model is 3801HGV

 
lan1.gif
lan002.gif
assistunixAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dbradley626Commented:
Try checking to see if you enable ssh and telnet on multiply interfaces or on just one
0
assistunixAuthor Commented:
Hello
What do you mean by "Try checking to see if you enable ssh and telnet on multiply interfaces or on just one"

The issue that i am facing right now is that in my router settings, it does not allow me to allocate ssh or tellnet or any other port to more than one server at a time.
Is there a way around it, can i allocate ssh or telnet or any other port to more than one server at a time?
0
jackiechen858Commented:
you need to NAT a public port into your internal network.

seems your router is a dumb one, not very flexible. so it only map external 22 port (ssh port) to one internal ip's 22 port.  A good router can map a external 1022 port to another internal ip's 22 port, then you can access your second AIX from outside by " ssh your_public_ip port 1022".


What you can do is reconfigure one of your AIX to listening on a different port, say 1022; you can do this by modifying /etc/ssh/sshd.conf

then add a user-defined application as tcp 1022. then you can map your second AIX server.

you can access it from outside by  ssh your_public_ip port 1022.



 
0
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

woolmilkporcCommented:
No need to reconfigure AIX.

Create a new application as suggested above, but in the "Map to Host Port" area specify port 22.

You could also use your first server as a "jump station" to reach the other server(s):

ssh -t user@server1 "ssh -t user@server2"

wmp



0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TomuniqueSr. AIX AdminCommented:
Is there any reason you need them both on port 22?

ssh {yourhomeIP}   will connect to host 1

ssh -oPort=1022 {yourhomeIP} will connect to host 2

Modify the port SSH listens on host 2, you can either move it to port 1022 (or whatever you choose)
  OR -- you can run it off both 22 and 1022  (so if host1 wants to connect to host 2, you don't have to specify the -oPort= option all the time.


TO move the port ssh listens on  part of it depends on how you start it:
if you runt it as a daemon:
Modify /etc/ssh/sshd_config
#Port 22                -- Uncomment this line, and change it to 1022 (or some other free port)
Port 1022
#Protocol 2,1
Protocol 2
#ListenAddress 0.0.0.0
#ListenAddress ::

if you are spawning sshd off via inetd
Modify /etc/inetd.conf:
$ grep ssh /etc/inetd.conf
ssh     stream  tcp     nowait  root    /usr/sbin/sshd         sshd -i

And modify /etc/services
$ grep ssh /etc/services
ssh                             1022/tcp          # SSH Remote Login Protocol
ssh                             1022/udp          # SSH Remote Login Protocol

Remember to recycle your services or reboot.  (this works for inetd, dont know about sshd)
kill -1   $(ps -ef|grep -v grep |grep inetd|awk '{print $2}')

Look to see where you're services are at now:
netstat -an|grep LISTEN
0
TomuniqueSr. AIX AdminCommented:
I didn't clarify how to run it on both ports (22 and 1022)
from "man sshd_config"
 Port Specifies the port number that sshd(8) listens on.  The
               default is 22.  Multiple options of this type are
               permitted.  See also ListenAddress.

So you could specify two lines
Port 22
Port 1022

Tom
0
assistunixAuthor Commented:
Hello
I don't need to use port 22 for both servers, i just wanted to be able to connect to both servers from outside the network with ssh, and that would be resolved with the "jumpstation" suggestion given by wmp, as that is all i was looking to do.

However i am keen to learn about other way whichjackiechen858 and Tomunique are suggesting that to define a new port in my ssh config file for it to run on. But putty does not have option of using 1022 or any other user defined port as ssh , does it?
0
woolmilkporcCommented:
Sure it does!
The "Session" setup let's you select "ssh" and just below this you can select the target port.

wmp
0
woolmilkporcCommented:
Sorry, not below, above (on the right).

In the "PuTTY Configuration" window clixk "Session" on the left. On the right select the "SSH" radio button, then enter the desired portnumber just above (a bit on the right, that is).

And commandline ssh has the "-p port" option:

ssh -p 1022 user@host ...

You can also specify the target port in ssh_config on a per-host basis.

wmp
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.