Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

At my workplace (a university) we have two Ubuntu servers. One is a teacher server and the other is a student server. I am currently setting up a new server to replace the existing teacher server.

The new server is currently online and I am trying to get it setup so I can SSH into it from my home. Right now, I can SSH into the existing teacher or student server and then SSH into the new server. However, I can not SSH directly into the new server.

What must I do so that I can SSH directly into the new server?

Thank you very much in advance for your time.

share|improve this question
    
If you can SSH into the server from other servers your problem has nothing to do with SSH.Maybe it's because of network configuration. –  Pedram Feb 20 '11 at 18:00
1  
@Pedram Exactly. Im assuming I need to change something in /etc/network . Hence why I'm asking here :p –  Rob S. Feb 20 '11 at 18:05
    
My guess is that iptables is configured to drop those "external" packets. –  mathepic Feb 20 '11 at 20:19

3 Answers 3

up vote 2 down vote accepted

If you already have ssh installed on the server and you can't connect from your home, probably you'll have to forward port 22 (or whatever port ssh is using) on the router.

share|improve this answer

Make sure to install openssh-server using synaptic or apt: sudo apt-get install openssh-server. At the end of the package install, the ssh service will be started automatically. From there, you might want to update the sshd_config file as needed in /etc/ssh.

share|improve this answer
    
sshd is already installed. –  mathepic Feb 20 '11 at 20:19
1  
First, I would check to see that the server is started: /etc/init.d/ssh restart; after that check the permissions on the user files. Run chmod go-rwx ~/.ssh ~/.ssh/authorized_keys. –  Arcege Feb 20 '11 at 21:23

First thing first: Can you SSH from a local connection, on the same internal network/segment ? If so, your server is OK. If not, install openssh-server, as previously mentioned. This will also generate local keys and will default to port 22/TCP. This can be changed later.

Second: If you are behind a firewall, can you ssh through it ? or is is right on a public IP address ? If you are on a public, reachable, IP address, and the first point was checked, you should be ready to go. However, there might be other transparent firewalls in the way, and this is out of your hands. The firewall admin will have to change that. get the IP of your own server, and ask that port 22 be open in inbound connection to your new Linux server.

Third: Is your original server using the port 22, or another port ? If using port 22, are you using another port from, say, home ? If so, the firewall would have to get setup to first accept connections on this other port, and redirect those to the proper port of your Linux box. Sometime, those redirections are used so that only certain ports are allowed globally. If you are SSH'ing from another organization, can you ssh to another known box in this same port ?

Many Many Many questions, I know, but those will help you pinpointing the actual problem and ask the right person. or fix the proper setting. The idea here is also to check from the closest connection to the most remote one. As you get further and further, you will be able to see if there is any issue and fix it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.