LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-04-2011, 04:20 AM   #1
RedNeck-LQ
Member
 
Registered: Jan 2011
Posts: 83

Rep: Reputation: 11
I can ssh into my server, but scp will not copy to the server


Note: I replaced my actual numbers with x's for security.

Howdy

I have a strange situation. I've setup a ssh server and I can ssh into it with no problem. e.g

Code:
ssh -p xxxxx redneck@192.168.x.xxx
However, if I try to use scp to copy a file on my computer to the ssh server. it won't allow me.

Code:
scp some_file -P xxxxx redneck@192.168.x.xxx:/home/redneck
ssh: connect to host 192.168.x.xxx port 22: Connection refused
lost connection

Funny thing is my port on the ssh server is not 22, it is a 5 digit number. I've checked the man page on scp and the capital P is use for port number, so I don't know why scp thinks the port on the server is 22 which is not and why I can connect ok with ssh but not copy to the server with scp.

Any ideas

Last edited by RedNeck-LQ; 10-04-2011 at 04:27 AM.
 
Old 10-04-2011, 04:30 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
nothing to do with networking, moved to Linux - Newbie. and your port number choice is not interesting to us. Move the -P to the start of the command, as per the manpage.
 
Old 10-04-2011, 04:56 AM   #3
RedNeck-LQ
Member
 
Registered: Jan 2011
Posts: 83

Original Poster
Rep: Reputation: 11
Quote:
Originally Posted by acid_kewpie View Post
Move the -P to the start of the command, as per the manpage.
It did worked as you said. What a dummy I am. I assume the -P xxxxx would work anywhere in the syntax like some commands do. Added a reputation to you
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 11:18 PM
[SOLVED] scp/ssh to cygwin server from linux server without password prompt... blainemiller Linux - Server 7 05-18-2011 03:04 PM
Server to server file copy through SCP or wget tibberous Linux - Server 6 12-19-2010 07:08 PM
Need to copy file (scp) to Debian server when reached 150 kb spaceuser Linux - Newbie 1 07-20-2008 04:56 PM
scp does not copy to a server??? malo_umoran Slackware 3 11-24-2006 05:13 AM


All times are GMT -5. The time now is 03:02 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration