Check port 2222 is open on a remote host

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Check port 2222 is open on a remote host
# 1  
Old 09-26-2013
Wrench Check port 2222 is open on a remote host

I am able to connect to a remote host using the legacy IP and port 2222.
Today the remote has a new IP I am unable to connect.

How to check if the remote host is blocking or if its my server is unable to connect.

Err Msg : telnet: Unable to connect to remote host: Connection refused
Err Msg : ssh: connect to host b port 2222: Connection refused
Connection closed

Let me know if you need more details.

Last edited by Scott; 09-26-2013 at 11:21 AM.. Reason: Code tags
# 2  
Old 09-26-2013
Can you connect to the host at all?
# 3  
Old 09-26-2013
No I cannot connect, this is the error when I telnet Unable to connect to remote host: Connection refused
# 4  
Old 09-26-2013
Are you sure you have the correct IP address?

Is it possible that the ssh server was configured to listen on a specific IP address (i.e. the ListenAddress option in /etc/ssh/sshd_config).

Have you tried scanning the IP to verify that ssh is listening?

nmap -sV -p2222 <ip address>

# 5  
Old 09-26-2013
Assuming ICMP echo hasn't been disabled, traceroute will shed light on the reachability of the new ip address.

If all is well with traceroute, then you know that the issue isn't physical and that routing is correctly configured, and firewalled or disabled services are likely the problem.

# 6  
Old 09-26-2013
Thanks for the advice. I am new to using traceroute, what options in traceroute should I focus on.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

SFTP file check through a remote host

Hi all, posting my first time, hope not breaking posting rules with it, if yes, let me know. I'm trying to build a script to check a file in an sftp server through a remote server. The intention is to check the file in a sftp host, and if the file is found or not, it should send an email.... (4 Replies)
Discussion started by: MrShinyPants
4 Replies

2. UNIX for Beginners Questions & Answers

Attach process with port 2222

Hi Team, is there any way, I can start any process for e.g. run a shell script (infinite loop) and attach it to port 2222? I am trying to create a scenario where an application will start running at port 2222 and I will telnet the same to confirm, application port is listening. So,... (1 Reply)
Discussion started by: vivekpandit7
1 Replies

3. Shell Programming and Scripting

Check/get the exit status of a remote command executed on remote host through script

Geeks, Could you please help me out in my script and identify the missing piece. I need to check/get the exit status of a remote command executed on remote host through script and send out an email when process/processes is/are not running on any/all server(s). Here's the complete... (5 Replies)
Discussion started by: lovesaikrishna
5 Replies

4. Shell Programming and Scripting

Pause processes in remote host and resume execution in another remote host

Hi, Given addresses of 2 remote machines, using a shell script is it possible to get the state of running processes in "src" stop all the processes in "src" exit out of "src" ssh into "dest" resume the state of executing processes captured in step 1 in "dest" Assumption: "src" is... (3 Replies)
Discussion started by: Saeya Darsan
3 Replies

5. HP-UX

how to check remote server port listening from application.

Hi, I have an application running on HP-UX, from this application I need to findout if the port number. lets say 7890,7891, 7892 are listening on the remote server running on HP-UX. Is there any way of doing it using "system()" function or any other? I noticed that nmap, netcat are not... (0 Replies)
Discussion started by: einsteinBrain
0 Replies

6. Solaris

Checking the port status of a remote host

Hi there I am in the process of writing a script to check whether a port on a remote system is up or not. Here's what I have so far: #!/bin/bash telnet xx.xx.xx.xx 80 | (echo "^]") if ]; then echo "Please check Web services " | mailx -s "Please check webservices... (1 Reply)
Discussion started by: notreallyhere
1 Replies

7. Shell Programming and Scripting

command to check whether the remote host is up or not

Hi, My script needs to check whether the remote host is up or not. If it is up i need to start few servers in that host or else just a notification should be sent that the remote host is down? Could someone help me out in this? Regards Arun (4 Replies)
Discussion started by: arunkumarmc
4 Replies

8. UNIX for Dummies Questions & Answers

How to Know is a Remote hosts have open port

Hi gurus of unix!!!!, I have a little question. I nedd your helps The scenarios is the following I have tree equipment that are installed in different places. I use a carrier to interconnect the equipment. Some Port's (TCP) need to be open for an application that must be function correctly. For... (3 Replies)
Discussion started by: andresguillen
3 Replies

9. Shell Programming and Scripting

check ssh connection to remote host

I am using KSH and I need to check whether the remote host has been configured with ssh public key. Is there any way we can check inside a script? (6 Replies)
Discussion started by: praveenbvarrier
6 Replies

10. UNIX for Dummies Questions & Answers

Bash Script to check Remote Host Connection

Hi all, Can anyone tell/guide me how to check remote host is up/running using bash script? Thanks. Zulfiqar (5 Replies)
Discussion started by: zulfikarmd
5 Replies
Login or Register to Ask a Question