Solved

Urgent : SSH Connection to Linux Server

Posted on 2004-04-09
8
289 Views
Last Modified: 2013-11-13

           Hi.

           I have just install Linux in a new pc and I use this pc as a development server.


           Then, I use any pc and open SSH in order to connect to my development server. I find that I am not able to connect to my development server.

            Do you have idea on what is going on? Do I need to do any setting in my Linux server? What is the setting? This is urgent and hope you can reply soon. Thank you.


Regards,
     Jocelyn
0
Comment
Question by:jocelynyip
8 Comments
 
LVL 17

Accepted Solution

by:
owensleftfoot earned 20 total points
ID: 10790121
What distro of linux are you using? Are you sure sshd is running on the development server? "service sshd status" (without the quotes) will tell you. If it isnt "service sshd start" will start it. "chconfig sshd on" will ensures it starts at boot time.
0
 
LVL 9

Assisted Solution

by:Alf666
Alf666 earned 20 total points
ID: 10790123
1) Check that ssh is installed
rpm -q -i ssh
or
rpm -q -i openssh

2) Check that sshd is running

ps awxu | grep sshd

3) Check that you can connect with a non-root user

4) If only root can not connect, change the following in your sshd_config :

PermitRootLogin yes

0
 
LVL 1

Assisted Solution

by:fyerk
fyerk earned 20 total points
ID: 10790846
In the event you're not using an RPM-based system, you can check if SSH is installed with:

whereis sshd
or
whereis sshd

Also, it's generally not good practice to ssh as root. You should ssh as a normal user and then use sudo or su to elevate your privileges as necessary.

Which errors are you getting when you try to connect to your server?
0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
LVL 12

Assisted Solution

by:mburdick
mburdick earned 20 total points
ID: 10790990
netstat -nap | grep ":22 " will tell you if anything is listening on the default ssh port (which is 22). If there's nothing listening, you need to be sure it's installed. You didn't specify which distribution you're using, so I can't give you a definite way to check, but    rpm -qa |grep ssh   will work on redhat, suse, and others. It's no good for distributions like slackware.

If it's installed but not running, you need to start it. This can often be done with    /etc/init.d/sshd start

If it's installed and running, but you don't get a prompt when you launch your SSH client, you need to check for firewall rules (which install by default on most systems now).   iptables -L -n    will usually show you what rules are loaded. If iptables comes back with information, paste the output back here so we can help you set the rules (or verify that they're already ok).
0
 
LVL 1

Assisted Solution

by:doushanes
doushanes earned 20 total points
ID: 10794741
Tip: not a good idea to have ssh allow root login if this machine is on the internet.  
If you need root. Login as user and su to root form there. Just my .02

doushanes
0
 
LVL 14

Expert Comment

by:isaman07
ID: 10797516
This depends on too many things, like the others pointed out, which distro of linux u r using? is openssh installed and running? and what are the machines that you are trying to connect from to your linux box?If this is one of the latest distros of linux and you are trying to connect from a windows xp or win2k machine, you must modify the sshd.conf file by turning on the PasswordAuthentication to yes.
Hope this will help.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
linux 13 75
How to check currently configured static routes on CentOS 7? 1 49
LogmeIn using Linux Ubuntu 16.04 6 59
RHEL 6.7 Gnome Desktop on VMware 6 VM 9 66
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
If you don't know how to downgrade, my instructions below should be helpful.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question