Solved

Can't connect through SSH

Posted on 2003-11-10
10
1,238 Views
Last Modified: 2012-05-04
I am new to Linux.  I just installed redhat 7.2 server, but I can't connected to this server through ssh.  I have checked openssh-2.9p2-7 has been installed on the server, and sshd is running.  What should I do to make it work?  Thanks!
0
Comment
Question by:Vincenthkl
10 Comments
 

Accepted Solution

by:
slaxs earned 64 total points
ID: 9717961
Hi Vincenthkl,

To connect to an OpenSSH server from a client machine, you must have the openssh-clients and openssh packages installed on the client machine.

Im guessing you installed the openssh-server package?


Slaxs



0
 

Expert Comment

by:slaxs
ID: 9717976
You must install OpenSSH server (openssh-server) the client (openssh-clients) packages, as well as the general OpenSSH package (openssh) for either of them to work. Hope this helps.
0
 
LVL 1

Assisted Solution

by:robsmart
robsmart earned 62 total points
ID: 9718742
might be that your firewall is blocking port 22 ?? check your firewall settings.
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 2

Expert Comment

by:joele23
ID: 9718990
If you are just having problems connecting from a remote machine try using ssh2.
Ive notice a lot of times if I cant ssh in and I try ssh2 it works fine.
0
 
LVL 4

Assisted Solution

by:ferg-o
ferg-o earned 62 total points
ID: 9719937
What user account are you using to connect? If you want to use root it is turned off by default in /etc/ssh/sshd_config - you will need to change the line:

PermitRootLogin no
to
PermitRootLogin yes

Some people don't like to allow root to login remotely due to brute force considerations so another way around it is to create another user using the useradd command and then connect via SSH with that and su to get root access...

Also you can limit access to ssh using /etc/hosts.allow and /etc/hosts.deny - I suggest reading up on those files if you are new to unix.

Good luck!
0
 
LVL 2

Assisted Solution

by:jlindq
jlindq earned 62 total points
ID: 9721389
To trouble-shoot try "telnet [host IP] 22" to connect to port 22 using telnet. If the SSH service is running and not filtered anywhere along the netowrk path you should get a SSH banner (e.g. "SSH-1.99-OpenSSH_3.7.1p2"). (Pressing Return will generate a protocol error and take you back to the prompt.)
If this works, the daemon is up and running and you can contact it. You then need a SSH client (OpenSSH or any other SSH client should do.)

If it doesn't work, I'd suggest trying it locally on the machine, both "telnet localhost 22" and "telnet [Host IP] 22" to see if you can connect locally. If you can't, there is some network filtering (firewalling) in place between the client and server.

You can also start sshd with the -d debug flag. It will then not spawn into daemon mode but run one single process withotu forks anbd output debug messages on the server that you can watch.

0
 
LVL 4

Expert Comment

by:ferg-o
ID: 12820200
Another one bites the dust.

People who post questions, receive answers or request for more info to help the answer, and do not close them out should be penalised methinks?
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Ensuring effective and secure communication in the age of healthcare BYOD.
The 21st century solution to antiquated pagers.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

776 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