Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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)
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).
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...)
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.
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
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.