LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-24-2018, 02:57 PM   #1
laredotornado
Member
 
Registered: Apr 2011
Posts: 71

Rep: Reputation: 0
What does this SCP error mean and how can I make SCP work?


I'm using CentOS 7. I'm trying to scp some files up to my VPS (using A2Hosting). Although I can SSH just fine, I'm getting this error using SCP that I don't understand

Code:
localhost:tmp davea$ scp -P 7822 ~/Documents/workspace/mydir console-afOMU5@my_ip_address:/tmp
console-afOMU5@my_ip_address's password:
Entering CT
Unable to get term attr: Invalid argument
What does this mean but more importantly what do I need to do to transfer the files?
 
Old 02-24-2018, 04:42 PM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,678

Rep: Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712
Have you tried SFTP? SCP is a bit of a kludge, while SFTP is a standard. I believe that there i a way to run CP in FTP protocol format, but I would rather just do SFTP in the first place.
 
Old 02-25-2018, 01:08 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
are you sure the username is console-afOMU5?

you can also try to prepend 'TERM=dumb'.

Last edited by ondoho; 02-25-2018 at 01:09 AM.
 
Old 02-25-2018, 09:46 AM   #4
laredotornado
Member
 
Registered: Apr 2011
Posts: 71

Original Poster
Rep: Reputation: 0
Hi, Yes, I can SSH in using the same port and credentials. I suspect this is because this usernam/epassword is issued through A2Hosting's serial console, which seems to be some kind of temporary session. Not sure why that would prevent SCP but allow SSH, but oh well.
 
Old 03-03-2018, 06:09 PM   #5
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
I think it's your use of the tilde in the command.

Just sayin'.
 
Old 03-03-2018, 09:54 PM   #6
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,678

Rep: Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712
Quote:
Originally Posted by Habitual View Post
I think it's your use of the tilde in the command.

Just sayin'.
If the KORN or BASH shell is being used, that tilde should be expanded and the full resulting path provided as the parameter.
Just sayin'

The point, though, is somewhat valid since we do not KNOW what shell the OP is using.
 
Old 03-04-2018, 01:17 AM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
i vaguely remember that scp has problems with expanding commandline arguments. not sure how it does it (circumvent the shell? seems impossible), but so i heard.
maybe "~" is not the same as "$HOME"?

interestingly, when i type
Code:
scp ~/<Tab><Tab>
it immediately expands to
Code:
scp /home/ondoho
when i do the same for cp:
Code:
cp ~/<Tab><Tab>
the "~" remains unchanged.

just sayin.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell scp works perfectly, Net::SCP::Expect calls timing out - reasons? EnderX Programming 1 04-27-2013 01:35 AM
Centos 6.3 host+guest: try scp to guest: scp cmd not found. ssh ok chrism01 Linux - Virtualization and Cloud 3 08-24-2012 01:52 AM
I'm defeated: Can't get SCP to work in chroot jail (but sftp and ssh work fine) ponga Linux - Security 2 09-30-2011 11:06 AM
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
Make SCP run in background? Moonman Linux - Software 3 11-29-2007 07:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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