LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 04-27-2010, 10:54 AM   #1
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 690

Rep: Reputation: 34
ssh/scp connection refused


I am logged in from my desktop (Fedora 12) to a server (Fedora 10) and I want to copy something from this server to my desktop using scp...
Had no problem in the past, but now I get :
Code:
[root@server 123456]# scp -vv recording.wav Jonas@192.168.1.21:/home/jonas/Desktop
Executing: program /usr/bin/ssh host 192.168.1.21, user Jonas, command scp -v -t /home/jonas/Desktop
OpenSSH_5.1p1, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.1.21 [192.168.1.21] port 22.
debug1: connect to address 192.168.1.21 port 22: Connection refused
ssh: connect to host 192.168.1.21 port 22: Connection refused
lost connection
I am clearly logged in to the server:
Code:
[root@server 123456]# w
 17:48:15 up 41 days,  2:43,  2 users,  load average: 0.02, 0.01, 0.00
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
root     pts/0    192.168.1.21     17:45    1.00s  0.19s  0.04s w
I have cleared all entries from ~/.ssh/known_hosts

The firewall on my desktop is disabled :
Code:
[root@jonas jonas]# /sbin/service iptables status
Table: filter
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination
I don't know what to do...
 
Old 04-27-2010, 11:52 AM   #2
rn_
Member
 
Registered: Jun 2009
Location: Orlando, FL, USA
Distribution: Suse, Redhat
Posts: 127
Blog Entries: 1

Rep: Reputation: 25
Just to clarify, you are logging in to the server and then running the scp command to copy stuff back to the desktop, correct? The desktop (ip: 192.168.1.21) may not have the ssh service enabled, and you may not be able to use scp from the server to the desktop. How do you login to the server; do you use ssh? Then in that case you should run the scp command from the desktop to fetch the file(s) from the server.

HTH.

-RN.
 
Old 04-27-2010, 02:07 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by jonaskellens View Post
I am logged in from my desktop (Fedora 12) to a server (Fedora 10) and I want to copy something from this server to my desktop using scp...
Had no problem in the past, but now I get :
Code:
[root@server 123456]# scp -vv recording.wav Jonas@192.168.1.21:/home/jonas/Desktop
Executing: program /usr/bin/ssh host 192.168.1.21, user Jonas, command scp -v -t /home/jonas/Desktop
OpenSSH_5.1p1, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.1.21 [192.168.1.21] port 22.
debug1: connect to address 192.168.1.21 port 22: Connection refused
ssh: connect to host 192.168.1.21 port 22: Connection refused
lost connection
I am clearly logged in to the server:
Code:
[root@server 123456]# w
 17:48:15 up 41 days,  2:43,  2 users,  load average: 0.02, 0.01, 0.00
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
root     pts/0    192.168.1.21     17:45    1.00s  0.19s  0.04s w
I have cleared all entries from ~/.ssh/known_hosts

The firewall on my desktop is disabled :
Code:
[root@jonas jonas]# /sbin/service iptables status
Table: filter
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination
I don't know what to do...

Check whether the sshd is running on your desktop, maybe?
Or, as rn suggested, just
scp jonas@server:/path/to/recording.wav .
from your desktop ... no point in having to ssh in to just
ssh back to the same location.
 
Old 04-27-2010, 02:30 PM   #4
fpmurphy
Member
 
Registered: Jan 2009
Location: /dev/ph
Distribution: Fedora, Ubuntu, Redhat, Centos
Posts: 299

Rep: Reputation: 62
On jonas check that you have the correct file permissions on .ssh and any files in .ssh.
 
Old 04-27-2010, 03:23 PM   #5
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 690

Original Poster
Rep: Reputation: 34
@ RN : yes, I ssh into the server and then scp back to my desktop

@ Tinkster : indeed on my desktop the sshd proces was not running... I updated from Fedora 10 to Fedora 12 and apparently the sshd proces is not in the chkconfig-list.

The problem was very stupid, but I just looked too far for the solution...
 
  


Reply



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
SSH - Connection Refused eminence Linux - Networking 15 02-11-2020 09:48 AM
ssh connection refused kevinsn Linux - Networking 5 03-31-2008 03:48 PM
ssh connection refused Verlager Linux - Networking 7 02-26-2008 05:54 PM
ssh connection refused - trying to set up ssh server at home openSauce Linux - Server 10 10-18-2007 04:38 PM
SSH Connection Refused meping Linux - Networking 9 04-15-2006 01:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:30 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
Open Source Consulting | Domain Registration