Unable to telnet to localhost [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
While trying to telnet to localhost I get the below error
telnet localhost 32768
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
Trying ::1...
telnet: connect to address ::1: Network is unreachable

If you run
netstat -ln
it will probably reveal that your server listens to 0.0.0.0, which only allows IPv4 to connect. If the software listens to :: (IPv6 ANY) instead, it will allow both IPv4 and IPv6 to connect unless it tells the kernel otherwise with socksetopt() call (See man ipv6(7) IPV6_V6ONLY)

Related

Global connection via netcat [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I would like to make very easy connection between two devices:
Device One is in WiFi1 and Device Two in WiFi2;
The Device One has local address 192.168.4.65;
The WiFi1 has IP address 12.34.56.78
(only example)
I want to run "nc -l <some parameters>" on my first device, and "nc <address>" on the second, so they connect;
I know, what to do if I want to connect two devices in a local area network;
But for global I have no Idea, what <some parameters> and <address> should be; can someone please help?
Thanks to #that-other-guy and #Barmar!!
You can do it by managing your router settings; If you configurate port forwarding, it will move you to the device you want to;
targeting 12.34.56.78:1234 to 192.168.4.65:1234. Then nc -l 1234 will be reachable with nc 12.34.56.78 1234

SSH local port forward can not access from outside [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
After
server-a$ ssh -L 9000:imgur.com:80 user#example.com
I can only
server-a$ telnet 127.0.0.1 9000
from the server-a, can not access 9000 port of server-a from outside.
How can I access the server-a 9000 from outside, I don't have any iptables ?
PS: I meet this problem before, after I edit the sshd_config, this problem was fixed, but I don't remember what I changed.
Add -g to the command
ssh -g -L 9000:imgur.com:80 user#example.com
From ssh man:
-g Allows remote hosts to connect to local forwarded ports.
means ssh will listen on other IP then localhost enabling you to connect to the forwarded port from outside your system.
This is not on by default because it can be a security issue (random people connecting to the forwarded port arriving on the supposedly secured destination server)

Getting connection refused while executing scp connection in amazon ec2 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 6 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I want to copy my file from local machine to remote machine in amazon ec2. I am executing following command:
scp -i ilmkey.pem shahjahan.txt ubuntu#ec2-52-25-74-139.us-west-2.compute.amazonaws.com:~
I am getting following error:
ssh: connect to host ec2-52-25-74-139.us-west-2.compute.amazonaws.com
port 22: Connection refused lost connection
The command telnet HOSTNAME 22 gives:
telnet: could not resolve HOSTNAME/22: Name or service not known
I have set
SSH TCP 22
0.0.0.0/0
in security group tab. Please help me to solve this.
A "connection refused" error makes me think that sshd is not running or that the machine failed to boot. If the Security Group was rejecting you, the question would time out instead. If this instance was already running and SSH was working before, reboot the machine from the console and see if SSH comes back up when it reboots. Also look at the logs via the AWS console, and if you still can't get anywhere, contact AWS Support.

ssh: connect to host localhost port 2222: Connection refused [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I installed Virtual Box on my Linux OS, in the Virtual Box, I created another Linux OS, which has a user called "dvader", I want to SSH from my local Linux OS to the Linux OS on Virtual Box, I used the command below:
$ ssh -p 2222 dvader#localhost
But I always got the error:
ssh: connect to host localhost port 2222: Connection refused
Anyone knows how to solve this problem? Thank you in advance.
cuestion: ¿are you using NAT?... SSH listen p22 by default, if you want connection on p2222 edit the ssh_config placed in /etc/ of your VM Guest... find the line (assuming that you are in a *buntu OS family)
39 # Port 22
and change it to
39 Port 2222
and there you have it on p2222
BTW, your host could'nt see the guest by name "dvader#localhost", because "localhost" it's indeed your HOST & your GUEST maybe another IP, give more details about your VNetwork config...
Sorry for my english :)

DNS lookup using host IP not working [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have set up a master DNS server using isc-bind. My problem is that when I try to look up hostnames from the same computer, it works when using localhost but not when I use the IP of the host.
This gives the correct answers:-
dig #localhost www.google.com
But this says "connection timed out; no servers could be reached"
dig #192.168.0.1 www.google.com
Here's my resolv.conf
nameserver 127.0.0.1
And when I run ping to 192.168.0.1, I get replies. What am I doing wrong here ??
Your instance of BIND is probably only listening on the loopback interface (127.0.0.1) and won't answer when addressed by an IP address that's associated with a real physical interface (your 192.168.0.1)
Look in your named.conf file for the listen-on directive. You may also need to change the allow-query ACL.

Resources