?
Solved

Can't connect through SSH

Posted on 2003-11-10
10
Medium Priority
?
1,243 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 

Accepted Solution

by:
slaxs earned 256 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 248 total points
ID: 9718742
might be that your firewall is blocking port 22 ?? check your firewall settings.
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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 248 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 248 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Let's recap what we learned from yesterday's Skyport Systems webinar.
The recent Petya-like ransomware attack served a big blow to hundreds of banks, corporations and government offices The Acronis blog takes a closer look at this damaging worm to see what’s behind it – and offers up tips on how you can safeguard your…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
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 …

762 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