LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 09-19-2011, 06:18 PM   #1
srinivasmmdl
Member
 
Registered: Aug 2011
Posts: 49

Rep: Reputation: Disabled
ssh problem


hi all,

i have enable ssh by running the command

1.systemctl sshd.service and
2.systemctl enable sshd.service

but when am trying to scp from server its giving error like

ssh: connect to host 192.168.1.139 port 22: No route to host
lost connection

what is the problem and how solve this
 
Old 09-19-2011, 06:24 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 476Reputation: 476Reputation: 476Reputation: 476Reputation: 476
@ Reply

Hi there,

Are you able to ping 192.168.1.139 IP address?

Is firewall running on 192.168.1.139. Usually if firewall is on it gives connection refused. The error message that you mentioned show that client machine is unable to connect to 192.168.1.139 on port 22.

Which means either ssh service is not running on 192.168.1.139 or your client machine is unable to communicate to 192.168.1.139.

Let us know the linux distribution that you are running on.
 
Old 09-19-2011, 06:44 PM   #3
srinivasmmdl
Member
 
Registered: Aug 2011
Posts: 49

Original Poster
Rep: Reputation: Disabled
ssh problem

ya am eable to ping to my server with ping 192.168.1.139

and am disable the firewall

again am facing the same error

sh: connect to host 192.168.1.139 port 22: Connection refused

please provide me the solution
 
Old 09-19-2011, 06:47 PM   #4
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 476Reputation: 476Reputation: 476Reputation: 476Reputation: 476
@ Reply

Quote:
sh: connect to host 192.168.1.139 port 22: Connection refused
The above tells us that the request is getting to the server but it is getting refused. Are you sure firewall is disabled. Did you check the selinux status?

We will not be able to help you if you will not provide us the full information. I asked you which linux distribution you are using but you didnt mention.
 
Old 09-20-2011, 02:02 AM   #5
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Answer erroneously sent as report:
Quote:
Originally Posted by srinivasmmdl View Post
firewall is on disable state
am using fedora15 32bit os(fc15-i686)
 
Old 09-20-2011, 06:55 AM   #6
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Did you uncomment these lines in /etc/ssh/sshd_config file mentioned below :-

#Port 22
#Protocol 2,1


if not, uncomment these above two lines in file /etc/ssh/sshd_config
 
Old 09-20-2011, 03:16 PM   #7
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 476Reputation: 476Reputation: 476Reputation: 476Reputation: 476
@ Reply

Thanks colucix


Hi srinivasmmdl,

fedora15 32bit os(fc15-i686)

I would suggest you to check selinux status on this server. You can check the selinux status using the following command:

Code:
sestatus
If it is running in enforcing mode then you can then disable it and then give it a try. To disable selinux edit its config file. Following is the command:

Code:
vi /etc/selinux/config
Change the value of SELINUX=enforcing TO SELINUX=disable, restart you machine and then give it a try to ssh.

I hope this helps.
 
Old 09-20-2011, 03:39 PM   #8
tekhead2
Member
 
Registered: Apr 2004
Distribution: slackware/FreeBSD/Vector
Posts: 291

Rep: Reputation: 52
I noticed you mentioned running an SCP command are you able to just SSH directly into a shell, or are you using scponly or some other type of restrictive shell? Is SCP enabled in your ssh config?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Chroot SSH problem: ssh working, not SFTP & SCP. NaCo Linux - Security 3 02-01-2009 03:23 AM
SSH problem - ssh-add not respond FerkoPica Linux - Security 6 05-07-2006 04:47 PM
Passwordless SSH with SSH commercial server and open ssh cereal83 Linux - General 7 04-18-2006 01:34 PM
ssh problem after creating an ssh alias. porotothorpe Linux - General 2 01-25-2006 08:56 PM


All times are GMT -5. The time now is 02:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration