Score:1

failed connect to localhost with nc

ma flag

Good evening,

I am trying to run the following command on Ubuntu 22:

nc -vv 127.0.1.1 1234

But console returns this error:

nc: connection to port 127.0.1.1 failed 1234 (tcp): connection refused

Do I have to enable or configure something before I can test this?

Score:1
mx flag

Netcat is blind and it can listen exactly to what you indicating. In your case, I think you will have to enable the service on the indicating host and port. Or just change the host or port of your already running service.

If you want to start a service on your localhost to listen for incoming connections you can use the -l flag.

nc -l 1234

Once the service is running at localhost and on port 1234, you can use the nc command again to start listening.

nc -vv 127.0.0.1 1234

If you want to connect to a different machine, you will have to know the IP address and the port where the service is running and listening. And then you can use something like this.

nc -vv <IP address> <port number>
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.