LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ssh/scp connection refused (https://www.linuxquestions.org/questions/linux-newbie-8/ssh-scp-connection-refused-804543/)

jonaskellens 04-27-2010 10:54 AM

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

rn_ 04-27-2010 11:52 AM

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.

Tinkster 04-27-2010 02:07 PM

Quote:

Originally Posted by jonaskellens (Post 3949453)
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.

fpmurphy 04-27-2010 02:30 PM

On jonas check that you have the correct file permissions on .ssh and any files in .ssh.

jonaskellens 04-27-2010 03:23 PM

@ 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...


All times are GMT -5. The time now is 10:27 PM.