[SOLVED] SSH - No access to internet

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read how to get help
Post Reply
User avatar
chrisdasp
Level 1
Level 1
Posts: 16
Joined: Sat Nov 03, 2018 1:26 pm

[SOLVED] SSH - No access to internet

Post by chrisdasp » Fri Nov 16, 2018 9:48 am

Hello,

I recently configured my main computer as a server for SSH (which works in LAN) but I cannot access to the internet at all.

How can I do to have the access to internet and when I want put him on server mode accessible on SSH?

Is there any command on terminal to stop that, let him connect to internet and be a normal computer, and when I want just active a command to put it as a SSH server?

Thanks in advance,
Chris
Last edited by chrisdasp on Mon Nov 19, 2018 6:01 pm, edited 1 time in total.
Dell Latitude E7440 - Intel(R) Core(TM) i5-4310U CPU @ 2.00GHz - SSD
Asus ROG 750JH - Intel(R) Core(TM) i7-4700HQ CPU @ 2.40GHz - HDD
Linux Mint Cinnamon

deepakdeshp
Level 11
Level 11
Posts: 3925
Joined: Sun Aug 09, 2015 10:00 am

Re: SSH - No access to internet

Post by deepakdeshp » Fri Nov 16, 2018 11:42 am

When you installed your computer, it should be connected to a router which I connected to the internet.In this case your machine will be automatically configured to connect to the internet.
The machine can be connected to the net and run ssh at the same time.
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
I am using Mint 19 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

User avatar
chrisdasp
Level 1
Level 1
Posts: 16
Joined: Sat Nov 03, 2018 1:26 pm

Re: SSH - No access to internet

Post by chrisdasp » Sun Nov 18, 2018 3:14 am

So the only one way to get the access to internet from a computer who is configured with SSH, it's via a cable Ethernet?
There is no way through the Wifi?
Dell Latitude E7440 - Intel(R) Core(TM) i5-4310U CPU @ 2.00GHz - SSD
Asus ROG 750JH - Intel(R) Core(TM) i7-4700HQ CPU @ 2.40GHz - HDD
Linux Mint Cinnamon

JeremyB
Level 19
Level 19
Posts: 9439
Joined: Fri Feb 21, 2014 8:17 am

Re: SSH - No access to internet

Post by JeremyB » Sun Nov 18, 2018 8:16 am

Are you sure your ISP doesn't block the port used by SSH? I think it is port 22

User avatar
chrisdasp
Level 1
Level 1
Posts: 16
Joined: Sat Nov 03, 2018 1:26 pm

Re: SSH - No access to internet

Post by chrisdasp » Sun Nov 18, 2018 8:30 am

JeremyB wrote:
Sun Nov 18, 2018 8:16 am
Are you sure your ISP doesn't block the port used by SSH? I think it is port 22
I truly do no know what is it. Just followed a tutorial on the web to set up a connexion SSH on my main computer, which works, but I cannot access to internet from this computer anymore.

How is it possible to check this ISP thing on port 22?
Dell Latitude E7440 - Intel(R) Core(TM) i5-4310U CPU @ 2.00GHz - SSD
Asus ROG 750JH - Intel(R) Core(TM) i7-4700HQ CPU @ 2.40GHz - HDD
Linux Mint Cinnamon

JeremyB
Level 19
Level 19
Posts: 9439
Joined: Fri Feb 21, 2014 8:17 am

Re: SSH - No access to internet

Post by JeremyB » Sun Nov 18, 2018 8:37 am


User avatar
chrisdasp
Level 1
Level 1
Posts: 16
Joined: Sat Nov 03, 2018 1:26 pm

Re: SSH - No access to internet

Post by chrisdasp » Sun Nov 18, 2018 9:18 am

It says the port 22 is closed on my IP address.

Does it mean my SSH server is blocking it?
It said the same for the port 80 by the way.
Dell Latitude E7440 - Intel(R) Core(TM) i5-4310U CPU @ 2.00GHz - SSD
Asus ROG 750JH - Intel(R) Core(TM) i7-4700HQ CPU @ 2.40GHz - HDD
Linux Mint Cinnamon

JeremyB
Level 19
Level 19
Posts: 9439
Joined: Fri Feb 21, 2014 8:17 am

Re: SSH - No access to internet

Post by JeremyB » Sun Nov 18, 2018 9:34 am

You could try a telnet command from outside

Code: Select all

 telnet  ipaddress 22

Neil Darlow
Level 1
Level 1
Posts: 42
Joined: Fri Aug 03, 2018 5:17 am

Re: SSH - No access to internet

Post by Neil Darlow » Sun Nov 18, 2018 10:37 am

If I understand your post correctly, you have configured a system to run a SSH service which you can access from your network but not externally from the Internet?

Your Internet connection will be managed by a router of some type (ADSL or Cable) and to permit external SSH connections you need to do two things on the router:
  • Open Port 22
  • Forward Port 22 of the router to Port 22 of your SSH server IP address
Regards,
Neil
LM19 Cinnamon, Intel Core i5 8400 2.8(4.0)GHz, Corsair Vengeance 3400 16GB, Asus Cerberus GTX1050 Ti OC, Samsung 970 Evo 500GB M.2, Western Digital Blue 4TB, Wircard RealTek 8821ae PCIe Dual Band Wireless+Bluetooth 4.0, Pioneer BDR-209EBK BDRW

User avatar
BG405
Level 7
Level 7
Posts: 1559
Joined: Fri Mar 11, 2016 3:09 pm
Location: England

Re: SSH - No access to internet

Post by BG405 » Sun Nov 18, 2018 1:41 pm

My interpretation is that the OP's machine isn't able to access web pages. To find out if there is any connectivity, try pinging a known IP e.g. ping -c3 8.8.4.4 & if this returns timings, you could also run this:

Code: Select all

wget -O - https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python
Having SSH connections should not inhibit internet connectivity; I use it all the time on my home network & do also use it to connect to remote machines. My router does not currently have the incoming ports open therefore I also can not access from outside, but that is my preference. I'd suggest using a different port for SSH as you do want it open.
Dell Inspiron 1525 - LM17.3 CE 64-------------------Acer D255E 2GB - Manjaro KDE, LM17.3 KDE 32
Toshiba NB305 - Manjaro KDE------------------------K7S5A AMD 1.2GHz - LM17.3 Xfce 32 & WinXP-Pro
Acer Aspire E11 ES1-111M - LM18.2 KDE 64 ----Dell PII 350 64MB - Puppy 4.3 & Win98-SE

User avatar
chrisdasp
Level 1
Level 1
Posts: 16
Joined: Sat Nov 03, 2018 1:26 pm

Re: SSH - No access to internet

Post by chrisdasp » Sun Nov 18, 2018 3:48 pm

BG405 wrote:
Sun Nov 18, 2018 1:41 pm
My interpretation is that the OP's machine isn't able to access web pages. To find out if there is any connectivity, try pinging a known IP e.g. ping -c3 8.8.4.4
The terminal says that 100% packets were loss, Destination Host Unreachable.
BG405 wrote:
Sun Nov 18, 2018 1:41 pm
& if this returns timings, you could also run this:

Code: Select all

wget -O - https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python
Having SSH connections should not inhibit internet connectivity; I use it all the time on my home network & do also use it to connect to remote machines. My router does not currently have the incoming ports open therefore I also can not access from outside, but that is my preference. I'd suggest using a different port for SSH as you do want it open.
So basically I cannot do that neither because I have no internet, even though I can connect my other laptop to this one through SSH in LAN.

I still do not know what I could do here :?
Dell Latitude E7440 - Intel(R) Core(TM) i5-4310U CPU @ 2.00GHz - SSD
Asus ROG 750JH - Intel(R) Core(TM) i7-4700HQ CPU @ 2.40GHz - HDD
Linux Mint Cinnamon

User avatar
BG405
Level 7
Level 7
Posts: 1559
Joined: Fri Mar 11, 2016 3:09 pm
Location: England

Re: SSH - No access to internet

Post by BG405 » Sun Nov 18, 2018 4:08 pm

I'm currently at a bit of a loss here but did you set the IP address(es) manually or are you using DHCP?

If the former, you might have to add the DNS server address(es) for your ISP or whichever one you normally use, assuming you haven't already; sure I had to do that on this machine (which is using a fixed IP address). You could use one of Google's (e.g. the one I posted above) as a test, or copy from another machine which is connecting OK.
Dell Inspiron 1525 - LM17.3 CE 64-------------------Acer D255E 2GB - Manjaro KDE, LM17.3 KDE 32
Toshiba NB305 - Manjaro KDE------------------------K7S5A AMD 1.2GHz - LM17.3 Xfce 32 & WinXP-Pro
Acer Aspire E11 ES1-111M - LM18.2 KDE 64 ----Dell PII 350 64MB - Puppy 4.3 & Win98-SE

User avatar
chrisdasp
Level 1
Level 1
Posts: 16
Joined: Sat Nov 03, 2018 1:26 pm

Re: SSH - No access to internet

Post by chrisdasp » Sun Nov 18, 2018 4:32 pm

I did this command that you provided above which is

wget -O - https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python

and basically from this laptop it works but it does not from the computer with the SSH configured. Even if I try to do through the SSH as if I was on the other machine.

So I do have the impression there is internet on the computer SSH configured, but only on entrance (I can connecte SSH LAN), but cannot have the access to webpages or even sudo apt update.
Dell Latitude E7440 - Intel(R) Core(TM) i5-4310U CPU @ 2.00GHz - SSD
Asus ROG 750JH - Intel(R) Core(TM) i7-4700HQ CPU @ 2.40GHz - HDD
Linux Mint Cinnamon

User avatar
BG405
Level 7
Level 7
Posts: 1559
Joined: Fri Mar 11, 2016 3:09 pm
Location: England

Re: SSH - No access to internet

Post by BG405 » Sun Nov 18, 2018 6:36 pm

Could you post the output of nmcli device show from the affected machine (probably easiest via SSH for copy & paste) and also inxi -Fxz? Note inxi won't show all graphics card data unless you use ssh -X, if it's configured, but that shouldn't matter in this case. This may be helpful. :)
Dell Inspiron 1525 - LM17.3 CE 64-------------------Acer D255E 2GB - Manjaro KDE, LM17.3 KDE 32
Toshiba NB305 - Manjaro KDE------------------------K7S5A AMD 1.2GHz - LM17.3 Xfce 32 & WinXP-Pro
Acer Aspire E11 ES1-111M - LM18.2 KDE 64 ----Dell PII 350 64MB - Puppy 4.3 & Win98-SE

User avatar
chrisdasp
Level 1
Level 1
Posts: 16
Joined: Sat Nov 03, 2018 1:26 pm

Re: SSH - No access to internet

Post by chrisdasp » Mon Nov 19, 2018 2:26 am

Edit :

Okay I just thought about reseting my internet parameters as default following this tuto :
https://askubuntu.com/questions/835195/ ... to-default

And it worked, I actually installed Wake On Lan on the machine and for some reason the config file was with additional lines that changed my IP to static instead of DHCP...

In case if someone has the same problem here is the answer, thanks everybody for your help, learned something today 8)


Chris'
Dell Latitude E7440 - Intel(R) Core(TM) i5-4310U CPU @ 2.00GHz - SSD
Asus ROG 750JH - Intel(R) Core(TM) i7-4700HQ CPU @ 2.40GHz - HDD
Linux Mint Cinnamon

Post Reply

Return to “Other networking topics”