I have logged on to a system with ssh and there is no scp present on both the systems. How to copy a file without using the scp program.

link|improve this question

50% accept rate
Is netcat (nc) present on both systems? If it is, use your ssh session to tunnel a TCP port and use nc on that port. – n.m. Jun 1 '11 at 9:06
Do you have rsync? – slhck Jun 1 '11 at 9:08
you can also do this: ssh user@remotehost cat /path/to/remote/file > /path/to/local/file – n.m. Jun 1 '11 at 9:11
feedback

migrated from stackoverflow.com Jun 1 '11 at 9:07

This question came from our site for professional and enthusiast programmers.

3 Answers

To send a file:

cat file | ssh ajw@dogmatix "cat > remote"

Or:

ssh ajw@dogmatix "cat > remote" < file

To receive a file:

ssh ajw@dogmatix "cat remote" > copy
link|improve this answer
feedback

Try this:

cat myfile.txt | ssh me@otherhost 'cat - > myfile.txt' 
link|improve this answer
2  
no need for that many cat calls at all – awoodland Jun 1 '11 at 9:13
feedback

Besides piping the file to a remote cat, you may also be able to use some SFTP client to transfer the files.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.