Connection timed out : I can't connect to my raspberry pi using ssh [closed] - ssh

Closed. This question is not about programming or software development. 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 9 days ago.
Improve this question
When I try to connect to my raspberry pi 4 using this command:
ssh user#XXX.XXX.X.XX
it does not work and it show the following error : "ssh: connect to host XXX.XXX.X.XX: Connection timed out".
I verified that ssh was enabled on my raspberry and it is.
I also tried to change the port with ssh config file to 5555. When I try to connect with this port, this also doesn't work.
My computer and my raspberry are both connected to the same network.
I can ping my raspberry pi:
C:\Users\user>ping XXX.XXX.X.XX
Envoi d’une requête 'Ping' XXX.XXX.X.XX avec 32 octets de données :
Réponse de XXX.XXX.X.XX : octets=32 temps=266 ms TTL=64
Réponse de XXX.XXX.X.XX : octets=32 temps=36 ms TTL=64
Réponse de XXX.XXX.X.XX : octets=32 temps=105 ms TTL=64
Réponse de XXX.XXX.X.XX : octets=32 temps=45 ms TTL=64
Statistiques Ping pour XXX.XXX.X.XX:
Paquets : envoyés = 4, reçus = 4, perdus = 0 (perte 0%),
Durée approximative des boucles en millisecondes :
Minimum = 36ms, Maximum = 266ms, Moyenne = 113ms
My final goal is to make my raspberry a little NAS, where I could access a folder with my pc, but for that, I have to add a server map with his accessible ip.
Thank you in advance for your answers!

Related

How to set vagrants host SSH port [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 3 years ago.
Improve this question
I have multiple VMs managed by vagrant in a production environment. I like to set their SSH host ports manually while I have to open every single port in iptables. Vagrant manages these port forwarding manually by default which forces me to open a range of ports which I doesn't want to.
I already tried a port forwarding but it ends up with two ports forwarded to the guest.
config.vm.network "forwarded_port", id: "a-named-ssh-forwarding", host: 54321, guest: 22
The problem is I cannot see any option in the vagrant SSH config section. Obviously I could set the guests SSH port only.
Vagrant SSH settings
Is it even possible to set the forwarded host SSH port and if yes how?
The solution is too simple.
Overriding the Default Forwarded SSH Port in Vagrant
Just rename the ID of the forwarded port to ssh.
config.vm.network "forwarded_port", id: "ssh", host: 54321, guest: 22
This in fact removes the possibility to identify the ssh forwardings to a specific VM by reading the list. But it's a low price for the enhanced system's security.

ssh to a bridged VM Guest on LAN [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 6 years ago.
Improve this question
i have a machine with ubuntu 16.04 x64 & virtualbox 5.0 installed as VM Host. then create a VM Guest (debian 8 x86) and set to bridged adapter.
the VM Host can ssh the VM guest by ip. but the others on Lan can not:
ssh: connect to host 192.168.0.106 port 22: Connection refused
ping VM guest is ok on both VM host and the others.
if setting to NAT adapter and port forward ssh is also fine
where would the problem be?
edit>
to make it clear:
there's 2 real machines in Lan(192.168.0.x) : 101 & 130.
a VM is created on 130 with bridged adapter, and the ip is 106.
130 can ssh 106, but 101 can not
both 130 and 101 can ping 106
if change VM to NAT adapter, and forward port 22 to 130:2222, 101 can ssh to the VM through 130:2222, seems that ssh works fine on VM
question is how to ssh a bridged VM on Lan?
it turned out to be a dhcp router issue.
the router donot specified the gate way ip caused this problem

SSH through multiple hosts to execute another ssh session [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I spent to much time trying to do something which in plain words looks simple
I am at home, without firewall and all open ports. I need to ssh to the router at work where I have access to ssh port 22. My personal machine is on that subnet having internal ip address. So, what I need to do is to ssh from one machine to the second and from the second to the third. On the third I need to execute another ssh which tunnels some ports to my home machine. All that in bash script from my home. I have tried many solutions on the internet but nothing works.
The whole ideal is to get to my PC at work and run ssh tunnel for port 22 which will allow me to sshfs my work PC.
I could do it manually, by sshing to the router, that form the router to the work pc and then execute the ssh tunnel. I need a one-click solution.
Thanks in advance!
Have you tried just stacking the ssh commands like ssh -t localhost ssh localhost be sure to add the -t option for each hop except the last one ssh -t localhost ssh -t localhost ssh localhost
Maybe try VNC? With the right setup/port forwarding, you wouldn't have to jump from 1 PC to the next.

How can I see what I am typing in telnet? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
When using telnet by using the command:
telnet <host ip> <port>
I can connect but then I cannot see what I am typing.
So I try:
telnet
set localecho
open <host ip> <port>
But this time it just hangs with the message:
Connecting to <host ip>...
How can I use telnet successfully after setting localecho?
It actually isn't hanging; it's just that, for some reason, it doesn't give any feedback to show that it's connected. If you start typing, you'll see that your input shows up in the upper-left hand corner of the window, overwriting what's already there. For example:
GET / HTTP/1.1rosoft Telnet Client
Escape Character is 'CTRL+]'
Microsoft Telnet> open example.com 80
Connecting To example.com...
You can see that I've typed GET / HTTP/1.1, overwriting Welcome to Mic.
(By the way, notice that I didn't have to type set localecho: for me local-echo was already on when I launched telnet without arguments, and I'm betting that for you it's the same.)

How to ssh to a remote server behind multiple firewalls? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
Here is my situation
I could access Server A from my home laptop via ssh.
Server B is only accessible from Server A via ssh.
Server C is only accessible from Server B via ssh.
Is there anyway that I could configure my .ssh/config so that I could ssh to Server C directly from my laptop ? I need this because I need regularly transfer files from Server C back to my laptop. I'm using 'scp' but go through this ssh hierarchy manually is too painful. I'm wondering whether there's a more straight-forward to do this via the magic of ssh.
You want to set up SSH tunnels to to allow SSH like this:
A => B
B => C
Here's an example of how to setup the tunnel to B through A on Linux:
ssh -f myusername#hostA -N -L 4444:hostB:22
Then, you should be able to ssh to port 4444 on hostA, and have that forwarded to port 22 (where SSH commonly runs) on hostB. After running the above command, try this:
ssh -p 4444 hostA
That should connect you to hostB. You may have to change ports for this to work, if port 4444 on hostA is already being used you'll have to pick a different port. Assuming that this works, you can use the same command with different hostnames to set up the tunnel from B => C:
ssh -f myusername#hostA -N -L 4444:hostB:4444
ssh -f myusername#hostB -N -L 4444:hostC:22
This is also useful if you want to set up a SOCKS proxy for web browsing. I do this so that my web traffic looks like it's coming from my university, so that I can use online access to scientific journals.
References:
Tunneling protocol
Breaking firewalls with OpenSSH and Putty
How to create an SSH tunnel using Putty, and then use that tunnel as a Firefox SOCKS proxy