LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-02-2020, 07:47 PM   #1
rjs1943
Member
 
Registered: Jan 2011
Posts: 55

Rep: Reputation: 3
SSH via Internet


I can connect to my ssh server via my local wifi in my house. Now say I go to town away from my home, can I still connect to my ssh server from there thru the internet, and is entering the login info different than connecting at my home? I probably will connect from my Android phone using Andftp app. In other words, can I still connect using the same login info I use when I'm home, or do I have to login different when I'm away from home?


Thanks.
 
Old 04-02-2020, 08:35 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,836

Rep: Reputation: 5971Reputation: 5971Reputation: 5971Reputation: 5971Reputation: 5971Reputation: 5971Reputation: 5971Reputation: 5971Reputation: 5971Reputation: 5971Reputation: 5971
The username/password is the same just not the IP address...

You can connect to your ssh server assuming your router/MODEM internet connection is using a public IP address.

You forward the ssh IP port to your servers LAN IP address. It helps if you configure the router to use a DHCP IP address reservation assignment for your ssh server.

Use a free dynamic IP DNS server like noip.com so that you can use a URL instead of trying to keep track of your public IP address although these days they tend not to change much if you leave your router powered on.

Use keys and disable password authentication to help protect the sever.
 
4 members found this post helpful.
Old 04-03-2020, 11:01 AM   #3
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
michaelk hit the nail on the head, take a look at my sig for some howto guides for setting up ssh keys.

their is an ongoing debate with port forwarding of known ports for specific services like ssh (port 22) to be moved to a different port external facing. ie: instead of port 22, use port 222 or something like that.

I ran an IPCop firewall for years and looking over the log files, port 22 was constantly hammered by script kiddies and real attackers from China, Iran, Russia, etc... Thankfully iptables has rules to drop full blocks of IP ranges so dropping China and other bad actors was not hard. I do use an alternate port and looking over the logs that port was only tapped, scanned when in use by myself or others how know and have access to my network.

noip.com has a good CLI tools that can run as a service on your system if you trust it, i have done this from time to time, but also as mentioned I no longer need it as my IP has not rolled in over 3 years.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to connect a netbook via cable via PC via UMTS-stick to the internet JZL240I-U Linux - Software 9 06-03-2015 11:45 AM
[SOLVED] raspbian: how to log in via ssh through wlan? (dont work; but ssh via LAN works) floppy_stuttgart Debian 8 03-24-2014 01:42 PM
Internet Radio Streaming via shoutcast via linux installed via an ftp server Good Cat Linux - Server 0 03-07-2011 05:35 AM
how to ssh linux pc via php script or via hyper link ping2tariq Programming 2 02-05-2007 07:13 PM
linksys wrt54g: Sveasoft Alchemy v1.0: problems loing on via web, can log in via ssh BaerRS General 1 10-16-2005 10:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration