LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-13-2005, 03:59 AM   #1
BroX
Member
 
Registered: Oct 2003
Location: Sweden
Distribution: Slackware64-current, SlackwareARM-15.0
Posts: 833

Rep: Reputation: 90
use of scp from server to laptop


Hey all,

I use scp to copy files from my laptop to my directory on our university server.

Q: how do copy files the other way around, from the server to my laptop? Do I have to add my server username (or something else?) to /etc/hosts.allow?

I got the following error:
Code:
 scp participants.cgi leon@leon-fyg.utu.fi:/home/leon/
Secure connection to leon-fyg.utu.fi refused.
lost connection
unix.utu.fi:/www/users/l/leobro/cgi-bin>
unix.utu.fi is the server, leon-fyg is the hostname of my laptop.

Any advice more than welcome!

Cheers, Leon.

Last edited by BroX; 01-13-2005 at 04:00 AM.
 
Old 01-13-2005, 04:23 AM   #2
overlord73
Member
 
Registered: Apr 2004
Location: ..where no life dwells..
Posts: 541

Rep: Reputation: 30
copy from remote to local:
scp user@host:/dir/file ./

copy from local to remote:
scp file user@host:/dir

...always: from - to
 
Old 01-13-2005, 04:24 AM   #3
overlord73
Member
 
Registered: Apr 2004
Location: ..where no life dwells..
Posts: 541

Rep: Reputation: 30
>Secure connection to leon-fyg.utu.fi refused.

seems like a connection prob, not syntax.
firewall?
 
Old 01-13-2005, 04:27 AM   #4
overlord73
Member
 
Registered: Apr 2004
Location: ..where no life dwells..
Posts: 541

Rep: Reputation: 30
is there something in /var/log/secure?
 
Old 01-13-2005, 04:42 AM   #5
BroX
Member
 
Registered: Oct 2003
Location: Sweden
Distribution: Slackware64-current, SlackwareARM-15.0
Posts: 833

Original Poster
Rep: Reputation: 90
overlord73,

I have no firewall (at least, nothing else than the default Slack install), and no entries in /etc/hosts.allow and /etc/hosts.deny.

Here is /var/log/secure of today:
Code:
root@leon-fyg:/home/leon# cat /var/log/secure
Jan 13 00:28:16 leon-fyg su[4512]: + pts/1 leon-root
Jan 13 00:30:31 leon-fyg su[4903]: + pts/1 leon-root
Jan 13 10:54:35 leon-fyg su[1402]: + pts/1 leon-root
Jan 13 12:37:33 leon-fyg su[1624]: + pts/1 leon-root
root@leon-fyg:/home/leon#

Last edited by BroX; 01-13-2005 at 04:45 AM.
 
Old 01-13-2005, 05:46 AM   #6
overlord73
Member
 
Registered: Apr 2004
Location: ..where no life dwells..
Posts: 541

Rep: Reputation: 30
a protocol/configure problem!?
perhaps the server (in this case the Laptop!) is configured to use SSH1 and your client uses SSH2....?SSH1 attempts to fall back to the "r"- commands when it cannot connect to a SSH daemon.
ehm...where are you logged in??
>scp participants.cgi leon@leon-fyg.utu.fi:/home/leon/
-> is from laptop to server!?!
 
Old 01-13-2005, 06:15 AM   #7
BroX
Member
 
Registered: Oct 2003
Location: Sweden
Distribution: Slackware64-current, SlackwareARM-15.0
Posts: 833

Original Poster
Rep: Reputation: 90
Quote:
Originally posted by overlord73
a protocol/configure problem!?
perhaps the server (in this case the Laptop!) is configured to use SSH1 and your client uses SSH2....?SSH1 attempts to fall back to the "r"- commands when it cannot connect to a SSH daemon.
How can I check which SSH protocol is used on either side?
In /etc/ssh/ssh_config everything is commented. Should I change some settings there?
Code:
# Site-wide defaults for various options

# Host *
#   ForwardAgent no
#   ForwardX11 no
#   RhostsRSAAuthentication no
#   RSAAuthentication yes
#   PasswordAuthentication yes
#   HostbasedAuthentication no
#   BatchMode no
#   CheckHostIP yes
#   AddressFamily any
#   ConnectTimeout 0
#   StrictHostKeyChecking ask
#   IdentityFile ~/.ssh/identity
#   IdentityFile ~/.ssh/id_rsa
#   IdentityFile ~/.ssh/id_dsa
#   Port 22
#   Protocol 2,1
#   Cipher 3des
#   Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc
#   EscapeChar ~
Quote:
ehm...where are you logged in??
>scp participants.cgi leon@leon-fyg.utu.fi:/home/leon/
-> is from laptop to server!?!
I am logged in at the laptop (leon-fyg.utu.fi) as user 'leon'. Then I connect to the server where my username is leobro: ssh leobro@unix.utu.fi

Last edited by BroX; 01-13-2005 at 06:20 AM.
 
Old 01-13-2005, 06:29 AM   #8
overlord73
Member
 
Registered: Apr 2004
Location: ..where no life dwells..
Posts: 541

Rep: Reputation: 30
ssh_config is ssh-client and sshd_config is ssh-daemon!
in both files there is an entry:
Protocol 2,1 (means ´use first SSH2 then SSH1´)
----
ok, if I understand u corect, u want to copy a file from SERVER to ur LAPTOP, while ur logged in on LAPTOP. -> there´s no need to ssh to SERVER!
on laptop console:
leon-fyg.utu.fi> scp leobro@unix.utu.fi:/home/leobro/FILENAME ./

should connect to SERVER and copy the remote file to localdir!
 
Old 01-13-2005, 06:40 AM   #9
BroX
Member
 
Registered: Oct 2003
Location: Sweden
Distribution: Slackware64-current, SlackwareARM-15.0
Posts: 833

Original Poster
Rep: Reputation: 90
THANKS!
I apologise for my ignorance in all this

Cheers, Leon.
 
  


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
SCP: Copy file from remote linux server onto a windows machine? Tony Empire Linux - Newbie 21 09-22-2015 10:18 PM
scp does not work and gives the following error message: scp: FATAL: Executing ssh1 i akay Linux - Networking 16 09-28-2008 11:41 PM
using a laptop as a server fuelinjection Linux - General 3 12-02-2005 08:51 AM
ssh/scp via a windows proxy server saleemlqorg Linux - Networking 2 01-09-2004 05:57 PM
dhcp server will not connect to laptop after laptop OS upgrade phamnewan Linux - Networking 0 06-21-2003 10:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:15 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