Telnet command on AIX

Hello,

I need to verify whether I am able to make connection to a remote server from my AIX (os level : 7.1.0.0) host.

The host has 2 Alias IP's how can I force an source Alias IP on the telnet command.

I tried the below options but none of them worked.

Is there any other command that I can use

admin@2a[/home/user/admin]# telnet -s x.x.x.x x.x.x.x 443
telnet: Not a recognized flag: s
Usage: telnet [-f|-F] [-k realm] [-l username] [-d] [-p] [-n NetTrace] [-e terminal] [host] [port]
admin@2a[/home/user/admin]# telnet -b x.x.x.x x.x.x.x 443 443
telnet: Not a recognized flag: b
Usage: telnet [-f|-F] [-k realm] [-l username] [-d] [-p] [-n NetTrace] [-e terminal] [host] [port] 

Thanks

telnet ip.addr
will connect where the ip.addr is the destination.

If you are trying to spoof your ip try using the nc command instead. ( nc is also called netcat )
how to "telnet" from a specific source IP?

telnet uses the OS to set it's source IP, you cannot specify it on the command line.

nc command did not work as well.

admin@pa[/home/user/admin]# nc -s x.x.x.x x.x.x.x 443
ksh: nc:  not found.

Please advise

The AIX at work has some optional Linux tools for AIX installed.
If you have to do this to debug problems or set up security, then you need to consider seriously installing them.

Before I look up what you need, if you cannot install anything then it is time to roll your own. So please advise. And give me the shells you have now, and the version of AIX. I cannot be of any help without more from you.

Here is the version and the shells

admin@2a[/home/user/badmin]# cat /etc/shells
/bin/csh
/bin/ksh
/bin/psh
/bin/tsh
/bin/bsh
/usr/bin/csh
/usr/bin/ksh
/usr/bin/psh
/usr/bin/tsh
/usr/bin/bsh
/usr/bin/bash
/usr/bin/dzsh


admin@2a[/home/user/admin]# oslevel -r
7100-04

AIX Open Source Packages | Main / nc

This is source code with directions for compilation --- for netcat (nc is often a symlink to netcat and or the other way around.). It requires a C compiler, which I assume you have. I have not tried to build it except as the root user, a few years back.

netcat (nc) on AIX does not exist. If you want to install it, it requires a million other packages as requisites that do not exist on AIX either - it is strictly speaking painful.
Without it, you will not be able to force AIX to use a specific source IP adress as AIX will always decide by itself which source IP to use consulting the routing table.
The easiest way to test - if you can have a temporary downtime for testing - is to temporarily change your IP address to the alias IP address and then simply telnet destinationhost port ? - And once tested just change it back.
In reality - considering that your alias sits o a physical adapter with an underlying IP, why do you even care?