[PLUG] 2-way exchanges with ssh and scp
Rogan Creswick
creswick at cs.orst.edu
Wed Dec 3 18:12:01 UTC 2003
On Wed, Dec 03, 2003 at 05:29:11PM -0800, Rich Shepard wrote:
> I can use scp to copy files from my main workstation/server to the
> laptops, but not the other direction.
>
> From the laptop, when I try 'scp salmo:<filename> .' I see:
> ssh_exchange_identification: Connection closed by remote host.
>
It looks like this is most often caused by an overly strict
/etc/hosts.deny
I am a bit confuse, you can copy from your workstation to your laptop,
or you can copy from the laptop to the server?
"scp salmo:<filename> ."
will copy <filename> from salmo to the local box (even if salmo is the
local box), so I'm assuming the server is salmo---although that might
be part of your problem, a confounded command line. I'll call the
laptop "laptop".
Also note that you can use scp to copy to a remote host, or from a
remote host, which is different from invoking scp from one host, or
invoking it from another host.
> So, do I need to make changes to /etc/ssh/ssh_config or
> /etc/ssh/sshd_config? And, on which machine? I've managed to get myself
> quite confused here at what needs to be set where for 2-way communications.
You probably need to change /etc/ssh/sshd_config on salmo.
This trick to reverse-ssh should also work (posted on here a while back):
# on salmo do this:
ssh -f -N laptop -R22000:localhost:22
#now, on laptop you can do this:
scp -p 22000 localhost:<filename> .
which will copy the file from _salmo_ to the laptop (despite the
localhost in the command line---the first command sets up a tunnel
from laptop:22000 to salmo:22).
-Rogan
>
> Thanks,
>
> Rich
>
> --
> Dr. Richard B. Shepard, President
> Applied Ecosystem Services, Inc. (TM)
> <http://www.appl-ecosys.com>
>
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
More information about the PLUG
mailing list