Author Topic: How to get 'scp' to work?  (Read 2768 times)

Offline joseppi

  • Sr. Member
  • ****
  • Posts: 309
    • The Invitation Bible
How to get 'scp' to work?
« on: February 05, 2010, 06:08:44 PM »
I want to use 'scp' to copy files on my old Mandriva 2006 system
to my new PCLinux system. But 'scp' times out.

I can 'ping' from old Mandriva to new PCLinux, but I cannot 'ping'
from new PCLinux to old Mandriva. 'ssh' and 'scp' are installed on both
systems. 'ssh' works to connect either system to my web hosting site,
but I cannot 'ssh' connect between old Mandriva and new PCLinux.

What do I need to do to get 'ping' 'ssh' and 'scp' to work both directions?

$ ssh 192.158.0.68
ssh: connect to host 192.158.0.68 port 22: Connection timed out

$ ping 192.168.0.68:
PING 192.168.0.68 (192.168.0.68) 56(84) bytes of data.
64 bytes from 192.168.0.68: icmp_seq=1 ttl=64 time=0.298 ms
64 bytes from 192.168.0.68: icmp_seq=2 ttl=64 time=0.110 ms

$ scp -v testfile joe@192.168.0.68:
Executing: program /usr/bin/ssh host 192.168.0.68, user joe, command scp -v -t .
OpenSSH_4.2p1, OpenSSL 0.9.7g 11 Apr 2005
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 192.168.0.68 [192.168.0.68] port 22.
debug1: connect to address 192.168.0.68 port 22: Connection refused
ssh: connect to host 192.168.0.68 port 22: Connection refused
lost connection


Offline Village Idiot

  • Hero Member
  • *****
  • Posts: 2345
  • Have A Nice Day.
Re: How to get 'scp' to work?
« Reply #1 on: February 05, 2010, 09:04:46 PM »
Is the target computer running a sshd?
Maybe try restarting the sshd.

The IP addresses:
192.158.0.68
192.168.0.68

Is your router blocking the transmission?
I would change the computer at 192.158.0.68 to something like 192.168.0.200 and retry.

hth

$ fortune
No Microsoft products were used in any way for the creation of this message.
If you are using a Microsoft product to view it, BEWARE! - I'm not
responsible for any harm you might encounter as a result.

Offline joseppi

  • Sr. Member
  • ****
  • Posts: 309
    • The Invitation Bible
Re: How to get 'scp' to work?
« Reply #2 on: February 06, 2010, 12:14:35 AM »
Woops. 192.158.0.68 was a typo. It was 192.168.0.68

How does one start or restart sshd?

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5337
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: How to get 'scp' to work?
« Reply #3 on: February 06, 2010, 01:05:42 AM »
Woops. 192.158.0.68 was a typo. It was 192.168.0.68

How does one start or restart sshd?


terminal window as root

service sshd restart

will do the trick




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline joseppi

  • Sr. Member
  • ****
  • Posts: 309
    • The Invitation Bible
Re: How to get 'scp' to work?
« Reply #4 on: February 06, 2010, 09:05:57 AM »
Thanks very much.
I did get 'scp' working in one direction (from my old Mandriva system to my new PCLinux system). But it still doesn't work going the other direction from PCLinux to Mandriva.  The old (2006) Mandriva system apparently does not have 'sshd' installed and I can't find a source for it.  Also, it has a custom (win4lin) kernel that I can't risk altering.  So is it possible to install 'sshd' without risking damage to the way everything currently works?  And if so, where might I find 'sshd' to install?


Offline Village Idiot

  • Hero Member
  • *****
  • Posts: 2345
  • Have A Nice Day.
Re: How to get 'scp' to work?
« Reply #5 on: February 06, 2010, 09:13:04 AM »
Since you are transferring files locally ie. not over the internet, you might consider rsync. Rsync -should- be on mandy. I don't know for sure but would be very surprised if it isn't

« Last Edit: February 06, 2010, 09:15:16 AM by F.Luent »
$ fortune
No Microsoft products were used in any way for the creation of this message.
If you are using a Microsoft product to view it, BEWARE! - I'm not
responsible for any harm you might encounter as a result.