You are not logged in.

#1 2011-10-02 01:56:29

newarch2011
Member
Registered: 2011-09-18
Posts: 41

newbie ssh connection issue

when i use putty on my windows 7 machine to ssh to one of my arch laptops i have an odd issue.
i connect to 192.168.1.15 (arch laptop) using port 22, sshd IS running on the laptop.
when i do

scp -v user@laptop:filename c:\filename

it shows this:

debug1; Reading configuration from /etc/ssh/ssh_config
debug1: Connecting to c [external ip] port 22

but what is odd is my laptop is not named c nor does the ip it display even relate in the slightest to my network. this is a lan so i shouldn't even be going out to the WAN.

i tested this from another arch laptop and it does the same thing. the issue is with scp not ssh. ssh connects fine but scp is what has the weird behavior.

what can i do to get this working? i would prefer not to need to sftp files around and i need to move files between laptops and i use my windows machine for backups.

Offline

#2 2011-10-02 02:19:00

s3kt0r
Member
Registered: 2009-01-20
Posts: 208

Re: newbie ssh connection issue

i use scp -P 7890 username@sshd_machine_LAN_IP:/path/to/file/or/dir /path/to/file/dir/on/client

of course, change 7890 to 22 to suit your actual configuration.


box1: Arch (linux-3.17-rc5)
box2: Gentoo (linux-3.17-rc5)
wm: subtle

Offline

#3 2011-10-02 02:23:57

newarch2011
Member
Registered: 2011-09-18
Posts: 41

Re: newbie ssh connection issue

it is still trying to do something with the crazy ip and i am trying a different arch laptop (i have 2 different ones). they both try to go to the same weird ip that my machine will never connect to.

Offline

#4 2011-10-02 02:38:10

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: newbie ssh connection issue

It's trying to connect to a machine named "c", as that is what you have told it to do. Firstly, you can't use scp to copy files to or from your Windows machine unless you have a ssh daemon running on your Windows machine; secondly, sshd does not take Windows-style paths.

Last edited by Barrucadu (2011-10-02 02:38:40)

Offline

#5 2011-10-02 13:02:38

newarch2011
Member
Registered: 2011-09-18
Posts: 41

Re: newbie ssh connection issue

it does the same thing when i go between linux machines and i did not tell it to connect to c. i gave it the internal ip as i showed you above where the hostname is NOT c. the ip it tried to connect to is not the other machine, nor is it my gateway or external ip. it doesn'teven exist in this network anywhere.

Offline

#6 2011-10-02 18:14:33

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: newbie ssh connection issue

Post an example of a scp command that is failing.

Offline

#7 2011-10-02 21:59:43

whitethorn
Member
Registered: 2010-05-02
Posts: 153

Re: newbie ssh connection issue

newarch2011 wrote:

when i use putty on my windows 7 machine to ssh to one of my arch laptops i have an odd issue.
i connect to 192.168.1.15 (arch laptop) using port 22, sshd IS running on the laptop.
when i do

scp -v user@laptop:filename c:\filename

it shows this:

debug1; Reading configuration from /etc/ssh/ssh_config
debug1: Connecting to c [external ip] port 22

but what is odd is my laptop is not named c nor does the ip it display even relate in the slightest to my network. this is a lan so i shouldn't even be going out to the WAN.

i tested this from another arch laptop and it does the same thing. the issue is with scp not ssh. ssh connects fine but scp is what has the weird behavior.

what can i do to get this working? i would prefer not to need to sftp files around and i need to move files between laptops and i use my windows machine for backups.

Ok just to understand what your doing,

1) You connect from windows 7 using putty (SSH) onto your laptop.
2) In the shell on you laptop run the following command (while connected, right after 1)).

scp -v user@laptop:filename c:\filename

It seems like you don't understand how the scp command works. It's just like the cp command. You can check out the map pages for scp and cp for more information. Your main problem is.

from cp man page
cp [OPTION]... [-T] <b>SOURCE DESTINATION</b>

With scp works basically the same way. scp SOURCE Destination

Copying from local PC (where you are logged on) to a remote PC

scp /file/you/want/to/copy user@other-pc:/file/where/you/want/it

or if you want to get the file on your pc. Here from a remote PC scp to where you are logged in pc.

scp user@other-pc:/file/location /where/I/want/it/on/my/pc

To be able to scp to a computer you need a ssh server to be running on the computer you are copying to. Probably the best way for you to copy files to/from your Windows PC is to use winscp. http://winscp.net/eng/download.php

Last edited by whitethorn (2011-10-02 22:01:50)

Offline

#8 2011-10-03 02:08:22

newarch2011
Member
Registered: 2011-09-18
Posts: 41

Re: newbie ssh connection issue

whitethorn wrote:
newarch2011 wrote:

when i use putty on my windows 7 machine to ssh to one of my arch laptops i have an odd issue.
i connect to 192.168.1.15 (arch laptop) using port 22, sshd IS running on the laptop.
when i do

scp -v user@laptop:filename c:\filename

it shows this:

debug1; Reading configuration from /etc/ssh/ssh_config
debug1: Connecting to c [external ip] port 22

but what is odd is my laptop is not named c nor does the ip it display even relate in the slightest to my network. this is a lan so i shouldn't even be going out to the WAN.

i tested this from another arch laptop and it does the same thing. the issue is with scp not ssh. ssh connects fine but scp is what has the weird behavior.

what can i do to get this working? i would prefer not to need to sftp files around and i need to move files between laptops and i use my windows machine for backups.

Ok just to understand what your doing,

1) You connect from windows 7 using putty (SSH) onto your laptop.
2) In the shell on you laptop run the following command (while connected, right after 1)).

scp -v user@laptop:filename c:\filename

It seems like you don't understand how the scp command works. It's just like the cp command. You can check out the map pages for scp and cp for more information. Your main problem is.

from cp man page
cp [OPTION]... [-T] <b>SOURCE DESTINATION</b>

With scp works basically the same way. scp SOURCE Destination

Copying from local PC (where you are logged on) to a remote PC

scp /file/you/want/to/copy user@other-pc:/file/where/you/want/it

or if you want to get the file on your pc. Here from a remote PC scp to where you are logged in pc.

scp user@other-pc:/file/location /where/I/want/it/on/my/pc

To be able to scp to a computer you need a ssh server to be running on the computer you are copying to. Probably the best way for you to copy files to/from your Windows PC is to use winscp. http://winscp.net/eng/download.php

I can try WinSCP on my Windows machine but this doesn't help the fact it has the same behavior from arch system to arch system when i try it that way. and i do use scp <source> <target> and it doesnt work.

Offline

#9 2011-10-03 17:16:58

whitethorn
Member
Registered: 2010-05-02
Posts: 153

Re: newbie ssh connection issue

What error do you get when you try to scp from linux to linux?

Offline

Board footer

Powered by FluxBB