Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
scp and different port
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
badgers
l33t
l33t


Joined: 04 Sep 2003
Posts: 680
Location: Madison, WI

PostPosted: Tue Oct 03, 2006 1:18 pm    Post subject: scp and different port Reply with quote

hello I am connected to my box over the internet via ssh2 but I changed ports to 6352

I am trying to use scp to copy a file off the box to my machine here.

mythtv@myth_host /mythtv/video $ scp -P 6352 localhost:1053_20061002190000_20061002193000.nuv c:\temp.mpg
ssh: connect to host localhost port 22: Connection refused

how can I make scp use the different port?
thanks
_________________
Abit KD7-S
Athlon XP2500+
166mHz FSB
512 Meg PC3200 Ram running at 166mHz
LiteOn DVD dual Layer burner(hdc)

2.6.17 Suspend2 kernel with no scsi support
Back to top
View user's profile Send private message
lagalopex
Guru
Guru


Joined: 16 Oct 2004
Posts: 565

PostPosted: Tue Oct 03, 2006 1:30 pm    Post subject: Reply with quote

From man scp:
Code:
scp -o Port=6352 ...
Back to top
View user's profile Send private message
alba74
n00b
n00b


Joined: 16 Aug 2005
Posts: 34
Location: Madrid

PostPosted: Tue Oct 03, 2006 1:33 pm    Post subject: Reply with quote

Hi,
It's not very how you wanna transfer your file. the scp -P {port} option is correct to indicate a different port then the default one,
but later why you use "localhost:{filename} c:\temp.mpg"....are you trying to copy to a win machine?

I would use:

mythtv@myth_host /mythtv/video $ scp -P 6352 1053_20061002190000_20061002193000.nuv {user@host}:/temp.mpg
assuming that you are tranfering a file from a linux where you are logged in to another linux connected remotely.

Don't know if I well understood your needs
Back to top
View user's profile Send private message
badgers
l33t
l33t


Joined: 04 Sep 2003
Posts: 680
Location: Madison, WI

PostPosted: Tue Oct 03, 2006 1:45 pm    Post subject: Reply with quote

alba74 wrote:
Hi,
"....are you trying to copy to a win machine?
YES

my home linux machine is running mythtv and I want to copy a video to my work machine(Win XP)

thanks
_________________
Abit KD7-S
Athlon XP2500+
166mHz FSB
512 Meg PC3200 Ram running at 166mHz
LiteOn DVD dual Layer burner(hdc)

2.6.17 Suspend2 kernel with no scsi support
Back to top
View user's profile Send private message
lagalopex
Guru
Guru


Joined: 16 Oct 2004
Posts: 565

PostPosted: Tue Oct 03, 2006 2:07 pm    Post subject: Reply with quote

So your windows is running sshd?
And you are working on the linux one?
Back to top
View user's profile Send private message
badgers
l33t
l33t


Joined: 04 Sep 2003
Posts: 680
Location: Madison, WI

PostPosted: Tue Oct 03, 2006 2:08 pm    Post subject: Reply with quote

Maybe :)
Putty is what I am using to connect via ssh to the linux box.

once connected I am trying to issue the scp command.

thanks

I am on the WinXP box at work and I wanted to copy the video to my desktop here in the office.

I have a slow upload so I figured if I started now by lunch the video will be done so I can watch it.
_________________
Abit KD7-S
Athlon XP2500+
166mHz FSB
512 Meg PC3200 Ram running at 166mHz
LiteOn DVD dual Layer burner(hdc)

2.6.17 Suspend2 kernel with no scsi support
Back to top
View user's profile Send private message
lagalopex
Guru
Guru


Joined: 16 Oct 2004
Posts: 565

PostPosted: Tue Oct 03, 2006 3:11 pm    Post subject: Reply with quote

Then use PSFTP on the windows machine.

To use scp (or the putty pscp) the remote host needs to run a ssh daemon and the port must be accessible...
Back to top
View user's profile Send private message
badgers
l33t
l33t


Joined: 04 Sep 2003
Posts: 680
Location: Madison, WI

PostPosted: Tue Oct 03, 2006 3:32 pm    Post subject: Reply with quote

lagalopex wrote:
Then use PSFTP on the windows machine.

To use scp (or the putty pscp) the remote host needs to run a ssh daemon and the port must be accessible...

I don't understand what you mean remote host.

I view the linux box at home to the be remote host and then yes it is running ssh and its port is accessible, it just isn't the default 22
I will take a look at the link you posted.
_________________
Abit KD7-S
Athlon XP2500+
166mHz FSB
512 Meg PC3200 Ram running at 166mHz
LiteOn DVD dual Layer burner(hdc)

2.6.17 Suspend2 kernel with no scsi support
Back to top
View user's profile Send private message
lagalopex
Guru
Guru


Joined: 16 Oct 2004
Posts: 565

PostPosted: Tue Oct 03, 2006 3:52 pm    Post subject: Reply with quote

You are at windows using pscp:
Code:
pscp -P 6352 1053_20061002190000_20061002193000.nuv user@linuxhost:/tmp/temp.mpg

Copy the local file (windows) "1053_20061002190000_20061002193000.nuv" using a connection to port 6352 at host "linuxhost". Login as "user" and save the file at the linux-machine at "/tmp/temp.mpg".
Back to top
View user's profile Send private message
badgers
l33t
l33t


Joined: 04 Sep 2003
Posts: 680
Location: Madison, WI

PostPosted: Tue Oct 03, 2006 3:55 pm    Post subject: Reply with quote

that is backwards, the file is on the linux box.

I want to bring the file to the windows box.
_________________
Abit KD7-S
Athlon XP2500+
166mHz FSB
512 Meg PC3200 Ram running at 166mHz
LiteOn DVD dual Layer burner(hdc)

2.6.17 Suspend2 kernel with no scsi support
Back to top
View user's profile Send private message
lagalopex
Guru
Guru


Joined: 16 Oct 2004
Posts: 565

PostPosted: Tue Oct 03, 2006 4:20 pm    Post subject: Reply with quote

Code:
pscp -P 6352 linuxuser@linuxhost:/path/to/source/file C:\path\to\destination\file

You must check the backslashs... double it or use slashs...
Back to top
View user's profile Send private message
hollyo
n00b
n00b


Joined: 25 Sep 2006
Posts: 13
Location: Netherlands

PostPosted: Tue Oct 03, 2006 6:55 pm    Post subject: Reply with quote

badgers wrote:

I want to bring the file to the windows box.


Then use psftp.
Back to top
View user's profile Send private message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Tue Oct 03, 2006 7:19 pm    Post subject: Reply with quote

or winscp
_________________
join the optout - http://nhsconfidentiality.org
Back to top
View user's profile Send private message
badgers
l33t
l33t


Joined: 04 Sep 2003
Posts: 680
Location: Madison, WI

PostPosted: Wed Oct 04, 2006 2:53 pm    Post subject: Reply with quote

since this is over the internet should the localhost be the ipaddress and the user be the login I want to use.

Is there a way to throttle the bandwidth?
it seems I crashed my linksys router last time I tried.
_________________
Abit KD7-S
Athlon XP2500+
166mHz FSB
512 Meg PC3200 Ram running at 166mHz
LiteOn DVD dual Layer burner(hdc)

2.6.17 Suspend2 kernel with no scsi support
Back to top
View user's profile Send private message
alba74
n00b
n00b


Joined: 16 Aug 2005
Posts: 34
Location: Madrid

PostPosted: Thu Oct 05, 2006 7:10 am    Post subject: Reply with quote

yes,
instead of localhost use the public IP and the user is the user you use to connect by SSH to Linux box.

With WinSCP you can set the % of how many bandwith available use to perform the transfer
Back to top
View user's profile Send private message
badgers
l33t
l33t


Joined: 04 Sep 2003
Posts: 680
Location: Madison, WI

PostPosted: Thu Oct 05, 2006 12:44 pm    Post subject: Reply with quote

thanks, It turned out the bandwidth was not the problem.

It works great
I appreciate everyones help
_________________
Abit KD7-S
Athlon XP2500+
166mHz FSB
512 Meg PC3200 Ram running at 166mHz
LiteOn DVD dual Layer burner(hdc)

2.6.17 Suspend2 kernel with no scsi support
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum