LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   What does this SCP error mean and how can I make SCP work? (https://www.linuxquestions.org/questions/linux-general-1/what-does-this-scp-error-mean-and-how-can-i-make-scp-work-4175624388/)

laredotornado 02-24-2018 02:57 PM

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?

wpeckham 02-24-2018 04:42 PM

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.

ondoho 02-25-2018 01:08 AM

are you sure the username is console-afOMU5?

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

laredotornado 02-25-2018 09:46 AM

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.

Habitual 03-03-2018 06:09 PM

I think it's your use of the tilde in the command.

Just sayin'.

wpeckham 03-03-2018 09:54 PM

Quote:

Originally Posted by Habitual (Post 5826985)
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.

ondoho 03-04-2018 01:17 AM

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.


All times are GMT -5. The time now is 11:18 AM.