scp failing with vast.ai

I'm using vast.ai at the moment, and I've used my container through the site to generate some images that I'd like to download. I've tried to use SCP with my public key (which works 100% of the time through SSH), but it's not letting me use SCP or SFTP to pull a file from the remote server to my system. Every time I try, it displays the regular welcome message that shows up when I use SSH, then it promptly kicks me out.

Is there anything I can do to get those files? The command I'm using for SSH is: ssh -p 11977 [email protected] -L 8080:localhost:8080, and then I'm authenticating with my public key.

Thanks for any help.


scp -P <port> <local file> root@<ip>:<dir>

Try with a capital "-P" for the port flag.


I've managed to fix the issue. First, I wasn't using the proper SCP syntax, but even after I found the right syntax, the shell would output some weird text and then exit again. After some searching on here and Super User, the problem seemed to arise from the ASCII art that the vast.ai container displays when you log in. I couldn't find out how to disable this, but after talking to vast.ai support, they just told me to delete the /etc/bash.bashrc file and try again. That seemed to get rid of the ASCII art, and eventually I was able to use SCP to download my files.

Vast.ai also stated that this was a bug that they found and that it has since been patched.