Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Enable telnet on solaris ?

Posted on 2005-05-13
42
Medium Priority
?
14,692 Views
Last Modified: 2013-12-27
Hi Experts,

I have searched over the Expert Exchange but didn’t found a proper solution for this.
Please advice !

Thanks !
0
Comment
Question by:Affno
  • 17
  • 12
  • 7
  • +3
42 Comments
 
LVL 5

Expert Comment

by:Nisus091197
ID: 13994648
Hi,

telnet is enabled by default.

Have a look in the /etc/inetd.conf file.  If the line is commented out then remove the '#' character.

Ensure that inetd is running by running this command:

ps -ef | grep inetd

inetd may be restarted by running this command as root:

/etc/init.d/inetd start

Hope this helps,

Regards, Nisus
http://www.omnimodo.com
0
 

Expert Comment

by:maheswarr
ID: 13994737
just edit this line in /etc/inetd.conf file

it must be available by default just uncomment it




telnet      stream      tcp6      nowait      root      /usr/sbin/in.telnetd      in.telnetd



then restart the inet daemon


/etc/init.d/inetd start
0
 
LVL 1

Author Comment

by:Affno
ID: 13994869

root@hostname# ps -ef | grep inetd
    root   157     1  0 16:07:19 ?        0:00 /usr/sbin/inetd -s
    root   386   353  0 17:52:08 console  0:00 grep inetd
root@hostname#

root@hostname# /etc/init.d/inetd stop
bash: /etc/init.d/inetd: No such file or directory
root@hostname#

/etc/inetd.conf file is okey ! but I can't telnet !
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 5

Expert Comment

by:Nisus091197
ID: 13995063
Hi,

log onto the server from the console and check that the service is running:

netstat -a | grep telnet

Check network settings:

netstat -nr

ifconfig -a

Check telnet itself on server:

telnet localhost

If all that seems okay, you may have a firewall issue.  Is sunscreen running?  Can you ping the server from another machine?

Please send in the error from telnet and the output from the commands above if this is still an issue.

Regards, Nisus
0
 
LVL 10

Expert Comment

by:neteducation
ID: 13995667
There is no file called /etc/init.d/inetd

inetd ist started through the startscript /etc/init.d/inetsvc

However you can stop inetd using

pkill inetd

and restart it using

/usr/sbin/inetd -s


Question: What exactly to you mean if you say you cannot telnet:

- If you try to telnet you get a connection refused (then start inetd as described above)

or

- if you try to telnet it prompts you for a loginname (you enter root) then for a password (you enter the password) and then it gives you a message "not on system console" ? (in this case, comment out the line that starts with CONSOLE= in the file /etc/default/login, no need to stop/start inetd)

or something completly different ?

0
 
LVL 16

Expert Comment

by:Hanno P.S.
ID: 13996089
Try
   telnet localhost
and/or
  telnet `uname -n`

What do you get here?
0
 
LVL 4

Expert Comment

by:BobHB
ID: 13996445
Yes, please provide more information...  some good questions have already been asked which should help you solve this problem.

One question I have is whether you get:

$ telnet server_xyz
server_xyz: Host name lookup failure

In which case the server you are trying to telnet to is not in the /etc/hosts file.

0
 
LVL 1

Author Comment

by:Affno
ID: 14008317
telnet service is running.
I can telnet to the localhost
and inetd restarted.

But when I'm trying to telnet

C:\>telnet 192.x.x.x
Connecting To 192.x.x.x...Could not open connection to the host, on port 23:
 Connect failed

C:\>
0
 
LVL 5

Expert Comment

by:Nisus091197
ID: 14008530
can you ping 192.x.x.x

do this on your PC:

tracert 192.x.x.x

netstat -nr

looks like a networking thing.

Regards, Nisus
0
 
LVL 1

Author Comment

by:Affno
ID: 14008556

send me a command add a IP to a interface please !
0
 
LVL 10

Expert Comment

by:neteducation
ID: 14008604
ifconfig <interface> addif <newip>
0
 
LVL 1

Author Comment

by:Affno
ID: 14008608
The sun server was a deferent IP range but now I have add secondary IP for the interface, but it still I’m having the same problem I can ping but can’t telnet.
0
 
LVL 10

Expert Comment

by:neteducation
ID: 14008619
>> telnet service is running.
>> I can telnet to the localhost
>> and inetd restarted.

Have you doe this on the server you try to reach or on the client ?
0
 
LVL 1

Author Comment

by:Affno
ID: 14008662
in the server I can't ping to the client ! but the client can't ping to the server.
0
 
LVL 10

Expert Comment

by:neteducation
ID: 14008678
>> in the server I can't ping to the client ! but the client can't ping to the server.

erm... say again.. there must be a typo up in that sentence. who CAN ping whom and who CANT ping whom?
0
 
LVL 1

Author Comment

by:Affno
ID: 14008698
Sun server CANT ping to the client.
But the client CAN ping to the server.
0
 
LVL 10

Expert Comment

by:neteducation
ID: 14008732
ok, I suppose the client is some xp-machine with xp-firewall active,  so this would be ok (tell me if I'm wrong).

Try the following:

On the server:

snoop port telnet

Then on the client:

try to telnet, so that you are getting an error message

Post the output of the above snoop command.

also on the server:

netstat -an | grep 23

and post the output here.

0
 
LVL 1

Author Comment

by:Affno
ID: 14008796
root@hostname# snoop port telnet
Using device /dev/bge0 (promiscuous mode)

root@hostname# netstat -an | grep 23
      *.32823                               Idle
      *.23                 *.*                0      0 49152      0 LISTEN
      *.23                              *.*                             0      0
49152      0 LISTEN
root@hostname#
0
 
LVL 10

Expert Comment

by:neteducation
ID: 14008864
ok, so your server is really listening to telnet. And as snoop did not output any data it seems that you are not getting to the correct machine or that some firewall on the client side or in between is preventing access.

So few more questions:

Is your sun-server and your client in the same network?
When you did that ifconfig-command up there was the interfacename bge0?
If you do an "ifconfig -a" on the server, does the value for "ether" (like ether 8:0:20:a7:d1:dc) match to the value you get when on the client you do a "arp -a" (which may look like this:   192.168.123.254       08-00-20-a7-d1-dc    where 192.168.123.254 is the ip of your server and the later should be what you got out of ifconfig -a) ?
0
 
LVL 1

Author Comment

by:Affno
ID: 14008914
Is your sun-server and your client in the same network?
Yes

When you did that ifconfig-command up there was the interfacename bge0?
yes the server have a bge0 and i have added a IP as same as my LAN IP range.
0
 
LVL 10

Expert Comment

by:neteducation
ID: 14008932
ok, what about the ifconfig -a (on the server) and arp -a (on the client)... do the ethernet addresses match ?

oh yes and more more thing... do you have some sort of firewall on your client (such as norton internet security) ?
0
 
LVL 1

Author Comment

by:Affno
ID: 14008951
ok, what about the ifconfig -a (on the server) and arp -a (on the client)... do the ethernet addresses match ?
Yes.

oh yes and more more thing... do you have some sort of firewall on your client (such as norton internet security) ?
I have Macafe, but In my XP box (client) I already doing telnet to some other servers.
0
 
LVL 10

Expert Comment

by:neteducation
ID: 14008966
ok, this is getting really strange....

Is the error still the same (now that you added the additional interface on the server , like this :

C:\>telnet 192.x.x.x
Connecting To 192.x.x.x...Could not open connection to the host, on port 23:
 Connect failed


And does this error come immediatly then you try it, or does it wait for some timeout ?

0
 
LVL 1

Author Comment

by:Affno
ID: 14009057
it's waiting some time and giving the error !
0
 
LVL 5

Expert Comment

by:Nisus091197
ID: 14009203
I am wondering if it is a DNS issue.

Put your PC IP address in the /etc/hosts file on the server.

Make sure that files is before dns in the /etc/nsswitch.conf

i.e.

hosts:      files dns

Is your DNS server working, check:

nslookup www.sun.com

Regards, Nisus
0
 
LVL 1

Author Comment

by:Affno
ID: 14009557
When the server starting "Hardware watchdog enabled" ???? please advice !
0
 
LVL 5

Expert Comment

by:Nisus091197
ID: 14009900
This is a normal message.

The OBP has a number of variables that can be set, one of these is:

watchdog-reset?=true

It can be disabled by setting it to 'false'.

Regards, Nisus.
0
 
LVL 1

Author Comment

by:Affno
ID: 14009943
is there any posiblity blocking ports ?
0
 
LVL 5

Expert Comment

by:Nisus091197
ID: 14010024
unlikely, 'netstat -na | grep ESTABLISHED' will show you all connections.

Did you add your PC IP address to the server?
0
 
LVL 10

Expert Comment

by:neteducation
ID: 14010999
ok, as it takes some time until the error occurs, this means that the pc is most probably sending out the packets but does not get any answer (also no negative answer), then after a while it times out.

as you can ping the server, and according to arp -a you are pinging the correct server, it should not be a problem about IP's.

A few more tests:

On the server: can you telnet to the ip-address of the server (not localhost)
From the server: can you telnet to some other unix-machine (no mather what kind of unix)?
Is the Server a production Server or can you try telnetting with only a crossovercable between yur xp-machine and the server (maybe your network switch is filtering?)?
0
 
LVL 1

Author Comment

by:Affno
ID: 14015919
I just added my PC IP to the server, still same condition.

Client Can ping to the Server, but server can't ping to the same client.

Server IP: 192.168.1.39
PC IP: 192.168.1.15

#
root@serverhostname# ping 192.168.1.15
ICMP Host Unreachable from gateway 192.168.1.39
 for icmp from 192.168.1.39 to pchostname192.168.1.15 (192.168.1.15)
ICMP Host Unreachable from gateway 192.168.1.39
 for icmp from 192.168.1.39 to pchostname192.168.1.15 (192.168.1.15)
ICMP Host Unreachable from gateway 192.168.1.39
 for icmp from 192.168.1.39 to pchostname192.168.1.15 (192.168.1.15)
ICMP Host Unreachable from gateway 192.168.1.39
 for icmp from 192.168.1.39 to pchostname192.168.1.15 (192.168.1.15)
ICMP Host Unreachable from gateway 192.168.1.39
 for icmp from 192.168.1.39 to pchostname192.168.1.15 (192.168.1.15)
ICMP Host Unreachable from gateway 192.168.1.39
 for icmp from 192.168.1.39 to pchostname192.168.1.15 (192.168.1.15)
^C
root@serverhostname#
0
 
LVL 1

Author Comment

by:Affno
ID: 14015926
The server is SunFire V240
0
 
LVL 10

Expert Comment

by:neteducation
ID: 14016583
What do you mean by

>> I just added my PC IP to the server, still same condition.

but anyway, this looks like a subnetmask-problem. what subnetmasks do you have ?
0
 
LVL 1

Author Comment

by:Affno
ID: 14016625
I have added my client machine IP to the server, hosts file.

192.168.1.0/255.255.255.0

But the server have some other IP for the same interface that's 192.9.229.x/255.255.255.0

root@serverhostname# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
bge0: flags=11000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,FAILED> mtu 1500 index
2
        inet 192.9.229.175 netmask ffffff00 broadcast 192.9.229.255
        groupname failover_group
        ether 0:3:ba:46:e9:cb
bge0:1: flags=11000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,FAILED> mtu 1500 inde
x 2
        inet 192.168.1.39 netmask ffffff00 broadcast 192.168.1.255
bge0:2: flags=19040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER
,FAILED> mtu 1500 index 2
        inet 192.9.229.150 netmask ffffff00 broadcast 192.9.229.255
bge1: flags=79040803<UP,BROADCAST,MULTICAST,DEPRECATED,IPv4,NOFAILOVER,FAILED,ST
ANDBY,INACTIVE> mtu 1500 index 3
        inet 192.9.229.151 netmask ffffff00 broadcast 192.9.229.255
        groupname failover_group
        ether 0:3:ba:46:e9:cc
root@serverhostname#
0
 
LVL 16

Expert Comment

by:Hanno P.S.
ID: 14016666
To clear these problems, we should have a clear view of your network setup

Please post from your PC the output of
  ipconfig /all
and from your Sun
  ifconfig -a
after a clean reboot (no "addif" issued or anything else).
Also, is there something in between the two machines (router, fireall, etc.)?
0
 
LVL 1

Author Comment

by:Affno
ID: 14016712


Ethernet adapter LAN:

        Connection-specific DNS Suffix  . :
        Description . . . . . . . . . . . : CNet PRO200 PCI Fast Ethernet Adapter
        Physical Address. . . . . . . . . : 00-08-A1-25-F9-64
        Dhcp Enabled. . . . . . . . . . . : No
        IP Address. . . . . . . . . . . . : 192.2.229.1
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        IP Address. . . . . . . . . . . . : 192.168.1.15
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 192.168.1.35
        DNS Servers . . . . . . . . . . . : 192.168.1.1
                                           

C:\>
0
 
LVL 16

Expert Comment

by:Hanno P.S.
ID: 14016758
OK, so we have this setup now:
PC  192.168.1.15 (class C network mask)
      192.2.229.1  (class C network)
Sun 192.9.229.175 (class C)
       192.9.229.150 (class C)
       192.168.1.39 (class C)

Connection between PC and Sun should work using the addresses of the private network 192.168.1.x/24

What looks strange is your output from the command ("Host unreachable")
  ping 192.168.1.15
on the sun. Please have name service checked with the following two commands:
  grep '^hosts:' /etc/nsswitch.conf
  getent hosts <pc-name>
Could you please post the output of
  netstat -rn
on your Sun, too?
0
 
LVL 10

Expert Comment

by:neteducation
ID: 14016763
ok, your solaris-machine has physical port bge0 and bge1 that are configured as a failover greoup (or multipath group). However both interfaces have failed. Also the multipathing does not seem to be setup completly (I am missing a data address on interface bge1, however this is not 100% needed).

as this is like this I don't think your machine is in production, right ?

Check cabling and if you dont need it then remove the multipathing-configuration (it's most probably configured in /etc/hostname.bge0 and /etc/hostname.bge1)

after this the ifconfig -a should no longer show the flag "failed". Also then you will be able to communicate using your sun-machine.
0
 
LVL 1

Author Comment

by:Affno
ID: 14016797
please explain me how can i remove these add ional lines ???

root@serverhostname# cat hostname.bge0
texas netmask + broadcast + group failover_group up \
addif 192.9.229.150 netmask + broadcast + -failover deprecated up
root@serverhostname# cat hostname.bge1
192.9.229.151 netmask + broadcast + deprecated group failover_group -failover st
andby up
root@serverhostname#
0
 
LVL 10

Accepted Solution

by:
neteducation earned 2000 total points
ID: 14016840
interactive:

ifconfig bge0 unplumb
ifconfig bge0 plumb
ifconfig bge0 texas up
ifconfig bge0 addif 192.168.1.39
ifconfig bge1 unplumb

permanent, so that it survives a reboot:

hostname.bge0 should look like this:

texas
addif 192.168.1.39

hostname.bge1 can be deleted completly.


if you want to do it without reboot, but it should also be there after a reboot then edit the files AND put the commands.
0
 
LVL 5

Expert Comment

by:Nisus091197
ID: 14016862
Hi,

The IP addresses are causing the confusion.  Setup the V240 to have only one IP address (192.168.1.39) for now.

Make a backup of the files first:

cp -p /etc/hostname.bge0 /etc/BACKUP-hostname.bge0
cp -p /etc/hostname.bge1 /etc/BACKUP-hostname.bge1

Start first from a simply network by removing the /etc/hostname.bge1 file

Edit the hostname.bge0 file to only include the hostname 'texas'.

Make sure that 'texas' is in the /etc/hosts file:

192.168.1.39   texas

Regards, Nisus.
0
 
LVL 16

Expert Comment

by:Hanno P.S.
ID: 14017027
Something you may want to take into consideration:
a) You removed some IP addresses to make sure your system works to communicate with the PC
b) The system was originally set up for IP/MP do have some sort of failover-capabilty
c) You have lost the failover capability now!!
Although, the failover-setup was incorrect and was not able to work in tis configuration anyway!

The bottom line:
1. Check why this system was set up as originally found
2. See how it should be configured correctly

The current solution looks like a "quick hack" to me :-(
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Suggested Courses
Course of the Month21 days, 4 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question