Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Attach process with port 2222 Post 302996450 by Yoda on Wednesday 26th of April 2017 11:27:46 AM
Old 04-26-2017
You can use nc (or netcat) to listen to a particular port:-
Code:
 
 nc -l 2222

From nc manual page:-
Code:
     -l      Used to specify that nc should listen for an incoming connection rather than initiate a connection to a remote host.

 

10 More Discussions You Might Find Interesting

1. Solaris

Which process is on which port....

Is there a way in Solaris to find which process is using which port? (3 Replies)
Discussion started by: Kraas
3 Replies

2. AIX

Process ID using IP Port

Is there a way in AIX to determine which process is connected to a particular IP port? I know about the lsof command, but for various reasons I can't install it on the machine I want to use it on. Is there a way other than using this command? (1 Reply)
Discussion started by: dgiaimo
1 Replies

3. UNIX for Advanced & Expert Users

attach process from another ssh session

Hi, I was logged in on a server, by ssh, with a vim open, when the battery of my laptop got empty. When I return to the server by ssh, I can see my previous ssh session still open, and the vim process running (ttyp0). Is there a way to attach that vim to my new session (ttyp4)? Here's part... (2 Replies)
Discussion started by: raphinou
2 Replies

4. UNIX for Advanced & Expert Users

How to attach an xterm to a process/thread ?

Hi folks, I would like to know how to hook up an xterm to another process. Here is a high level view of what I am looking for 1. Main program starts 2. It creates an new xterm window 3. It then forks a second process & passes the xterm handle to it 4. The second process uses the second... (4 Replies)
Discussion started by: RipClaw
4 Replies

5. UNIX for Advanced & Expert Users

Which port is used by which process ?

Hi all, I work in three platforms SOLARIS,HPUX,AIX. My requirement is to find the user id which is using a particular port. So I tried searching commands which will help me to know which port is used by which process. According to the posts over here lsof makes life easy in this case. But I... (4 Replies)
Discussion started by: vikasrout
4 Replies

6. Programming

dbx - attach to process, break when crash

Hey everyone, I have a process that is crashing, and I'd like to have some way to see where it crashes. Is this possible? (2 Replies)
Discussion started by: ctote
2 Replies

7. AIX

Process running on which port

I would like to know, how to find that particular process is running on which port other than /etc/services as this file shows well known ports information Double post, continued here. If you want answers for different OS, post in a general section instead. If you want your other post moved... (0 Replies)
Discussion started by: amity
0 Replies

8. IP Networking

Tcp ip port open but no such process (merged: Release A Port)

i want to kill a tcp connection by killing its pid with netstat -an i got the tcp ip connection on port 5914 but when i type ps -a or ps-e there is not such process running on port 5914 is it possible that because i do not log on with proper user account i can not see that process running? (30 Replies)
Discussion started by: alinamadchian
30 Replies

9. UNIX for Dummies Questions & Answers

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... (5 Replies)
Discussion started by: ITDev01
5 Replies

10. IP Networking

Get process id and port from the socket

Hello, Please help me in getting the process id and the port number from the socket netstat -Aan|grep -i closed f100050010b133b8 tcp 0 0 *.* *.* CLOSED f1000500119b53b8 tcp4 0 0 *.* *.* ... (3 Replies)
Discussion started by: Vishal_dba
3 Replies
TRACE-CMD-LISTEN(1)													       TRACE-CMD-LISTEN(1)

NAME
trace-cmd-listen - listen for incoming connection to record tracing. SYNOPSIS
trace-cmd listen -p port [OPTIONS] DESCRIPTION
The trace-cmd(1) listen sets up a port to listen to waiting for connections from other hosts that run trace-cmd-record(1) with the -N option. When a connection is made, and the remote host sends data, it will create a file called trace.HOST:PORT.dat. Where HOST is the name of the remote host, and PORT is the port that the remote host used to connect with. OPTIONS
-p port This option will specify the port to listen to. -D This options causes trace-cmd listen to go into a daemon mode and run in the background. -d dir This option specifies a directory to write the data files into. -o filename This option overrides the default trace in the trace.HOST:PORT.dat that is created when a remote host connects. -l filename This option writes the output messages to a log file instead of standard output. SEE ALSO
trace-cmd(1), trace-cmd-record(1), trace-cmd-report(1), trace-cmd-start(1), trace-cmd-stop(1), trace-cmd-extract(1), trace-cmd-reset(1), trace-cmd-split(1), trace-cmd-list(1) AUTHOR
Written by Steven Rostedt, <rostedt@goodmis.org[1]> RESOURCES
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git COPYING
Copyright (C) 2010 Red Hat, Inc. Free use of this software is granted under the terms of the GNU Public License (GPL). NOTES
1. rostedt@goodmis.org mailto:rostedt@goodmis.org 06/11/2014 TRACE-CMD-LISTEN(1)
All times are GMT -4. The time now is 09:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy