LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-28-2012, 09:42 PM   #1
wunfuntin
LQ Newbie
 
Registered: Feb 2012
Posts: 5

Rep: Reputation: Disabled
SSH mac to linux


Hey everyone,

I am really new to networking, however, being a crystallographer I need to learn to use networks effectively so that I do not burn up my machine by running all the modeling programs on one system.

I have recently set up another computer to serve as a server on my home network. Right now it is running crunchbang and I have the ssh working only while I am at home connected to my home network. However, while I am on the university network I cannot access my home computer.

I set up port forwarding (port 22) on my apple time capsule, but when I try to ssh to the computer at my home I get a connection refused error. I tried using both the static IP address as well as the network address that I use to connect when I am on my home network as they are both different.

To give you a few more details, I am trying to ssh from a mac to the crunchbang system on a network configured through an apple time capsule (used also my home router).

Any help on resolving this matter specifically would be much appreciated as many of the things I have read seem to not specifically address this issue.

Thank you your help

wunfuntin
 
Old 02-29-2012, 01:18 AM   #2
cbtshare
Member
 
Registered: Jul 2009
Posts: 610

Rep: Reputation: 42
It may be that your university is blocking port 22 so you wont be able to get through...You must also have a static ip address thats accessible from outside your network.(Your isp would need to allow port 22 to be open as well)
 
Old 02-29-2012, 02:48 AM   #3
rodrifra
Member
 
Registered: Mar 2007
Location: Spain
Distribution: Debian
Posts: 201

Rep: Reputation: 36
As cbtshare pointed out, your university must be blocking that port, besides, you only need to connect to the public IP of your home network, not the private one (192.168... or 172.16 ....).

Start your ssh server in port 80, and forward traffic to it in your router, or just make a port translation in your router so that incoming connections to port 80 in your router translate to port 22 in your machine.

After that try to connect from the university using port 80 (ssh -p80 your.home.public.ip).

Last edited by rodrifra; 02-29-2012 at 02:50 AM.
 
Old 02-29-2012, 04:35 PM   #4
arizonagroovejet
Senior Member
 
Registered: Jun 2005
Location: England
Distribution: openSUSE, Fedora, CentOS
Posts: 1,078

Rep: Reputation: 195Reputation: 195
Either I'm misunderstand something or talk of the University is blocking port 22 is entirely erroneous. The computer the OP is trying to ssh in to is not at the University, it's at their home. I would very, very surprised if a University has their network set up so as to prevent someone at the University from making an ssh connection to a computer outside the University. I work at a University and have no doubt there would be uproar if the network were so configured.

Sounds to me the most likely cause if the port forwarding isn't set up properly. Does the Linux box always have the same IP address or does it periodically change due to DHCP lease expiring? My home router has to be periodically rebooted to keep it working and whenever I do that all my devices get that use DHCP end up with different IP addresses. (Yes I should do something about that...)
 
Old 02-29-2012, 05:01 PM   #5
wunfuntin
LQ Newbie
 
Registered: Feb 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
I do not think that the port is being blocked.


I have to agree with arizonagroovejet that I probably have not set it up properly. I have not noticed that the IP address changes on my home network. When I ifconfig I only get the home router IP address 10.0.1.7 but if I look at it on the web my IP adress is something entirely different and does not seem to change or expire. I have tried ssh with either address and it still says connection refused.
 
Old 02-29-2012, 05:03 PM   #6
wunfuntin
LQ Newbie
 
Registered: Feb 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
though I should note that I do have to periodically reboot my modem and router also due to the fact that I am connected wirelessly but am not receiving data to connect to the net
 
Old 02-29-2012, 06:34 PM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
Over time, your home (external on your modem) IP addr supplied by your ISP will change, unless you pay extra for static IP.
What you would need is eg http://www.no-ip.com/, specifically 'FREE dynamic DNS update client.' or similar.
 
Old 02-29-2012, 10:01 PM   #8
wunfuntin
LQ Newbie
 
Registered: Feb 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
what do you mean by your.home.public.ip?
 
Old 02-29-2012, 10:49 PM   #9
wunfuntin
LQ Newbie
 
Registered: Feb 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Hey guys,

i figured it out. I was using the wrong command for ssh. the command i use while on the home LAN works fine and also is the same ssh command layout to connect to a dedicated server at the university via vpn. eg ssh -X username@xx.x.x.x (xx.x.x.x being the LAN IP) I then tried using this command ssh -X -l username XX.XX.XXX.XXX (XX.XX.XXX.XXX being my static ip address.

Thank you all for your comments and I am glad people are here to offer help. I am learning a lot.

wunfuntin
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] ssh from Mac OS X to Linux mspadaccino Linux - Server 18 08-31-2011 02:49 PM
ssh -x on a mac osx to a Linux computer 1veedo Linux - General 6 09-19-2007 06:22 PM
Can't SSH into Linux from Mac OS X with D-LINK DSLG604T jez247 Linux - Networking 5 02-22-2007 08:35 AM
Mac OS X ssh client / linux sshd : ssh hangs/disconnects Apollo77 Linux - Networking 1 05-24-2006 12:53 PM
X Server for Mac OS 9? (for SSH into linux box) culturejam Linux - Software 0 09-29-2004 11:00 PM


All times are GMT -5. The time now is 12:59 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration