LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-15-2006, 09:49 AM   #1
tredontho
LQ Newbie
 
Registered: Feb 2006
Distribution: FreeBSD 6.0-RELEASE
Posts: 15

Rep: Reputation: 0
What IP address to use for ssh


Hi, I know this is a linux forum, but this question should be general enough. I use FreeBSD 6-Release, i believe... (I'm a newbie, sorry), and I can ssh just fine from my windows box that's on the same LAN (using 192.168.0.3). I want to be able to ssh from school, however, a completely different network. I know that i need to use a different ip, but i don't know what ip. I went to whatismyip.com and found the ip there, but just to check, i also did it on my windows box, and they returned the same address. I'm behind a router, using dsl (slower than cable, but it's the best i can get where i live in rural america)

so, i need to know what to set up in order to ssh into the box, or how to set up a different ip address, or whatever it is i need to do... i really don't know, i've tried reading up (on ssh, and on ip addresses and how they work), but i still don't really understand it. I'm at school right now, so i can't implement anything you give me to do at home, but any help is appreciated, or at least where to read up on them (which would be even better, i like learning the why, not just the how). Thanks

tredontho
 
Old 02-15-2006, 10:24 AM   #2
tizzef
Member
 
Registered: Jan 2005
Location: Nice, France
Distribution: Ubuntu,RHES, Mandriva, RHAS, AIX 4.3.3, 5.2 & 5.3, Debian,Solaris8/10
Posts: 119

Rep: Reputation: 20
There is several reason for that stuck.
When you are connected at school, I guess there is a firewall, filtering all the trafic between the school and the web.
You want to access to your box, which is in your home, I am right ??
First of all: do you actually know the @IP of your linux box ?

--
tizzef
 
Old 02-15-2006, 11:06 AM   #3
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
You'll need to port forward port 22 from your router to your linux box. Then you can connect to the IP show on whatsmyip.com.
 
Old 02-15-2006, 03:08 PM   #4
tredontho
LQ Newbie
 
Registered: Feb 2006
Distribution: FreeBSD 6.0-RELEASE
Posts: 15

Original Poster
Rep: Reputation: 0
okay, i forwarded (hopefully correctly) port 22 to my FreeBSD box (192.168.200, now), and used the ip address displayed by whatismyip.com, and got

Network error: Connection refused

One of my friends was saying that port 22 might be blocked by the isp, since his (different) isp blocks port 80, but there would be similar reasons for blocking both ports. If this is the case, how do i set the ssh server on my freebsd box to listen on some arbitrary port?

thanks,
tredontho
 
Old 02-16-2006, 01:11 PM   #5
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
In the sshd_config, there should be a "Port 22" option. Change this to, say, "Port 1000" and then adjust the port forwarding similarly. (Or your router might be able to forward internet port 1000 to local port 22)
 
Old 02-16-2006, 01:12 PM   #6
tredontho
LQ Newbie
 
Registered: Feb 2006
Distribution: FreeBSD 6.0-RELEASE
Posts: 15

Original Poster
Rep: Reputation: 0
Well, I glanced through the sshd manpage, and found that i needed to edit a configuration file to allow sshd to listen on other ports, but i'm unsure as to what exactly to edit. So, any help there would be nice. I can use whatever port i want, pretty much (as long as it's not being used by another server or program, right?), and then forward that. I'm pretty sure, at this point, that it's just the isp blocking port 22. notice pretty sure, not beyond all doubt.

On a side note, having never used ssh extensively, I am wondering if it is possible to start a job, process, or program, whatever (perhaps updating my system), from a remote location, and then to log off of that remote location, but keep the job going. If this is possible, what do I need to do, and if not... well, just let me know that it's not, i suppose. thanks,

tredontho
 
Old 02-17-2006, 12:07 AM   #7
philix
Member
 
Registered: Sep 2005
Location: India
Distribution: Redhat Debian
Posts: 36

Rep: Reputation: 15
Hi Tredontho,

You can use the [nohup COMMAND & ] so that process will be running in the background. Even if you log out of the remote SSH login. Any output from the process will be logged onto the nohup.out file which the nohup command creates.

Thanks
Philix
 
Old 02-19-2006, 01:18 AM   #8
tredontho
LQ Newbie
 
Registered: Feb 2006
Distribution: FreeBSD 6.0-RELEASE
Posts: 15

Original Poster
Rep: Reputation: 0
alright, editing the sshd_config file to have port 1000 in it worked, thanks a lot for your help.

philix, I don't suppose that there's a way for me to start something, detatch it from my current terminal, and then later attatch it to a different terminal... for instance if at some point later on the process required user input... for some reason i thought i remembered reading somewhere (no idea where) that this was possible, but that could just be me making things up. right now what i do to achieve this is log in on my local machine, and leave the terminal going, then log in from a remote machine, and use the 'watch -W ttyn' command to start jobs directly on my local machine's terminal. i suppose this works, but i don't like leaving my machine logged in and open... any info would be appreciated.
thanks again for the help guys,

tredontho
 
  


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
deny ip address with ssh DaWallace Slackware 16 05-31-2005 08:40 PM
SSH to an external IP address BluePyre Linux - Software 2 07-14-2004 06:10 PM
Cannot ssh into Linux with external ip address gautam1980 Linux - Newbie 1 02-13-2004 02:14 PM
ssh IP address problem demain Linux - Newbie 4 01-30-2004 04:57 PM
SSH To IP Address Fails - Localhost Works ViragoRider Linux - Newbie 7 10-03-2003 07:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:46 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