netcat on suse 11.1

Hello all,

I am new to the forum and new to linux… but I’m loving it!

Problem:

I’ve compiled and installed netcat ( I think ) . I cant seem to be able to do anything with it ( I’m new to netcat as well ).

When I type in the command: " nc -l 80 "

I get results:

The program ‘nc’ can be found in the following package:

  • netcat-openbsd path: /usr/bin/nc , repository: zypp (repo-oss) ]

Try installing with sudo zypper install netcat-openbsd

-bash: nc: command not found.

But when I type: " netcat -l 80 "

Results:

Nothing happens… it seems like it is doing something but there are no results. Then I just push ctrl+c .

THEN… when I enter : netcat and hit enter… I get a different promt that looks like this… Cmd line:

But it still doesn’t seem to do anything when I put commands in.

So I’m not sure if I’m doing something wrong… or if it’s not installed properly. If anyone would like to share thier experiences or opinions on the matter It’d be much appreciated.

Thanks.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

First, ‘netcat’ is, I believe, installed by default on all SUSE
releases. That may have changed with 11.1 but you shouldn’t need to
compile it yourself anyway, as the first message is telling you.

Second, the ‘-l’ switch tells netcat to listen on the port you
specified. In your case port 80 is specified, and you’ll need to be
‘root’ to have it bind to that port. Get more details with ‘-v’ but
otherwise it’s probably working properly.

netcat -v -l 80

Good luck.

3ricc wrote:
> Hello all,
>
> I am new to the forum and new to linux… but I’m loving it!
>
> Problem:
>
> I’ve compiled and installed netcat ( I think ) . I cant seem to be able
> to do anything with it ( I’m new to netcat as well ).
>
> When I type in the command: " nc -l 80 "
>
> I get results:
> --------------------------------------------------------
> The program ‘nc’ can be found in the following package:
> * netcat-openbsd path: /usr/bin/nc , repository: zypp (repo-oss) ]
>
> Try installing with sudo zypper install netcat-openbsd
>
> -bash: nc: command not found.
> ---------------------------------------------------------
>
>
>
> But when I type: " netcat -l 80 "
>
> Results:
>
> Nothing happens… it seems like it is doing something but there are no
> results. Then I just push ctrl+c .
>
>
> So I’m not sure if I’m doing something wrong… or if it’s not
> installed properly. If anyone would like to share thier experiences or
> opinions on the matter It’d be much appreciated.
>
>
> Thanks.
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJWqQr3s42bA80+9kRAhWJAJ9lLXFw1usR2HU4JtQwuWeIkWFcLQCffmGr
tBIabVAeaGel18B3WeL887A=
=LJKx
-----END PGP SIGNATURE-----

netcat is available as a package so you didn’t have to compile.

As far as I can tell it’s working properly. Do you know how to use it? If not perhaps read the manual page which points you to the README documentation for examples.

In short

nc == the openbsd version of netcat, package “netcat-openbsd”

netcat == a hihly patched version of the original netcat. package “netcat”

Hi, I am also trying to use netcat. I am using the “nc” “netcat-openbsd”. My idea is to use netcat for fast file transfer over my local wireless as substitute of SCP.

I run

 sudo nc -l 23341 

on the host machine. I have proven that netcat is running via


>>: sudo netstat -utanp | grep "nc *$"
tcp    0   0 0.0.0.0:23341 0.0.0.0:*    LISTEN 4264/nc

So far so good. Running

nc host_ip 23341

on the remote machine, unfortunately, does not result in any messages displayed on the host machine.

To see whether netcat is running properly, I tried to use

 sudo nc -l 23341 

and then subsequently

nc 127.0.0.1 23341

This would function properly, however, sending messages between different terminals is not what I am trying to get. I am new to the entire network business and I presume that the cause of this strange behavior lies in some mistake. Perhaps, I need to specially configure the firewall. Although, opening tcp port with

sudo nc 

should be able to open the port without any problems.

I would appreciate your help.

Did you notice that this thread is from 2008?

Thus it is very unlikely that anybody involved 6-7 years ago is still following what happens in this thread. It is also very unlikely that you use the same versions of the involved software.

When you want to draw the maximum o fattention to the a problem/question you have at this moment in time (which is what I assume), then the best thing is to start a new thread in the best fitting (sub)forum with a good title that will lure people into reading it.

This thread will be CLOSED to avoid littering it.