firewall has blocked ssh. any wayarounds? - ssh

I want to connect to remote amazon aws service(EC2 instance) , and I would like to be able to ssh to it from my laptop while using the campus provided network (which has cyberoam firewall). However, they have pretty much every port blocked and ssh won't work. Is there anything i can do? does ssh run through port 80? I don't really know what to do .
All it says is :
ssh_exchange_identification: read: Software caused connection abort
ssh works elsewhere.

You can set your SSH server to use port 80 (or 443 if 80 is used for a webserver). Just check the configuration file of your ssh server for more details!

Related

Can't access on server after used ufw and forgot to allow port 22 to SSH

I have used UFW on my server, and I forgot to allow port 22 to ssh. Now I can not access on the server. I using hosting by Linode. Please give me a solution, I can not find anything to open port 22, because I can not access it.
ssh: connect to host xxx.xxx.xxx.xxx port 22: Operation timed out
This really should be a support ticket on Linode.
What they would tell you though is to access your Linode "out-of-band" with the Linode Shell a.k.a. LiSH. THey have a Linode Doc.

How to fix ngrok forwarding port?

I am ssh-ing onto a remote desktop. Since I have to connect over the internet, I have exposed the ssh port (22) on the remote side using ngrok, and everything is working great. I connect to the desktop using the command
ssh username#2.tcp.ngrok.io -p portno
where I get the portno from the remote side, when I start the ngrok service from the line that says
Forwarding tcp://2.tcp.ngrok.io:portno -> localhost:22
However, everytime I start a new ngrok session on the remote side, a new portno is generated. Now, unless I have a secondary connection open (typically using teamviewer), I would not be able to know what that port number is.
How can I start the ngrok service with a fixed portno. This is because I want to have the ngrok service on startup as I would have to restart my remote desktop a couple of times and still want to connect to the desktop using ssh.
Thanks.
You'll need to reserve a TCP address on ngrok, which will give you a fixed address.
To associate a tunnel with a reserved TCP address, you should include the remote-addr option in your ngrok config when starting the tunnel.
An example from the docs: ngrok tcp --region=us --remote-addr 1.tcp.ngrok.io:20301 22

Is it possible to do ssh FROM ovh shared-hosting?

I need to launch a script on a Raspberry Pi from my OVH web site.
The Raspberry Pi is behind a modem and I redirected port 22 to the Raspberry Pi local address. If I try to connect with the modem public IP (eg 91.XX.YY.ZZ) from a computer on the LAN it works as expected : ssh pi#91.XX.YY.ZZ works.
However if I try to do the same command from the OVH shared server (I ssh from my computer to OVH server, and when connected type the command above), I get ssh: connect to host 91.XX.YY.ZZ port 22: Connection refused although I set up temporarily the Raspberry Pi to allow PasswordAuthentication yes (and rebooted it). I would expect to be prompted for password when ssh-ing from the OVH host.
So now I fear ssh request emitted from OVH server may be blocked by OVH (as ping is for example), but would it give such connection refused message, and how can I test it ? Otherwise what did I do wrong ?
Any help greatly appreciated!
After a bunch of research with other key words (php ssh2_connect OVH) it seems that it is not possible do ssh FROM OVH shared-hosting. Here is a discussion from 2019 (in French).

Port forwarding EMR Zepplin through SSH

I'm trying to establish a secure connection to my emr server on AWS.
I have successfully connected through putty to it. However I would like to use zeppelin through the SSH tunnel.
Does the following look correct to forward the port 8890 from the EMR host to my local machines 8890 so that traffic is encrypted? Im on a windows machine.
Thanks,
Tim
Destination is in respect to the SSH Server. Providing Localhost:8890 will mean 8890 of the machine on which SSH server is running.

Forward server HTTP traffic to handle in another device via SSH Tunnel

I'm developing some webhook required direct access public domain to internal machine, thinking use SSH tunnel to forward data, or got alternative solution?
Hosting server & development machine are in same network
192.168.1.2/24 (Hosting server)
2nd machine is virtual mapping using forticlient firewall without static or dynamic IP in visible in hosting server, so is 1 way initial communication right now.
In this case possible to setup SSH tunnel forward all traffic from 192.168.1.2:80 to handle in development machine port 8080?
How to ssh syntax look like?
Thanks.
This could be done by setting up an SSH tunnel to the remote machine:
ssh -L localhost:80:localhost:8080 development-system
Every request to port 80 on the hosting-server is now forwarded to port 8080 on the development-system.
Please note, that the port 80 on the hosting-server could only be used, when you start the SSH command as root. Also note that the port 80 is only accessible from the hosting-server. To access the port 80 on the hosting-server from everywhere use the following:
ssh -L 80:localhost:8080 development-system
Be sure that you want that.
A good introduction to the topic could be found at
https://www.ssh.com/ssh/tunneling/example
https://unix.stackexchange.com/questions/115897/whats-ssh-port-forwarding-and-whats-the-difference-between-ssh-local-and-remot