How to hell does SCP work? SSH works just fine...

How to hell does SCP work? SSH works just fine, and I can view all the files from the computer I'm SSHed into and download them. But when I try to upload a file to the computer the shit just don't work. I've got my webserver running ubuntu server and my laptop on Windows using an ssh client that supports SCP.

Same transaction as SSH, only the data that's being transmitted is going to a file

So if ssh works then why does scp fail, and fail only one way (the way I need it to work)

Explain what you are doing and whats happening, maybe we can help you out.

Can you ssh both ways?

PEBKAC

You run scp on the laptop.
Be it upload or download, just swap the source file and destination file.
If it failed to upload, most likely you don't have write permission on that folder.

My server accepts all the connections from my laptop but my laptop doesn't accept my server. SSH works fine up I try to upload a file to my server from my laptop then I get the error "ssh: connect to host [laptop] port 22: Connection refused"

>I try to upload a file
>to my server
>from my laptop

>ssh: connect to host [laptop] port 22: Connection refused
>connect to host [laptop]
>connect to laptop

>upload a file to my server
>connect to laptop

wew

Run scp on your laptop.

scp source destination

To upload to server:
scp source user@server:/destination/folder

To download from server:
scp user@server:/source/file destination

Oh well, if it's too hard for you get a sftp client, like winscp.

scp -i /path/to/key /path/to/file.ext user@server:/path/to/put/file/.

I'm running the command correctly but it just says "ssh: connect to host [laptop] port 22: Connection refused" This worked fine when I was using linux on both systems but I've never encountered Windows errors before.

They're a self funded agency that financially exploits the anomalous artifacts they are in possession of. Through liberal usage of memory-altering substances they clandestinely protect the rational world from the dangerously abstract.

You clearly don't want any help because you still haven't posted the command that's failing. I'll just treat your threads as a weak attempt at trolling and move on.

Laptop@Laptop ~
$ scp Laptop@Laptop/file Server@server/destination
ssh: connect to host Laptop port 22: Connection refused

Use /file instead of Laptop@Laptop/file.

try without Laptop@Laptop, just /path/to/file Server@server/path/to/file

>itt
>op can't google scp examples
>op can't use man pages
>op can't follow consise examples provided by generous anons
>op confirmed for illiterate SOB

Add to it doesn't say thank you after the advice worked.

I actually figured it out. I'm not use to windows-linux interactions but I managed to nail it down to the very specific syntax needed for the command to work on windows AND I had to change ownership of the file BEFORE I sent it because of some Windows fuckery.

You ain't fooling anyone. Connection failed is not Windows fuckery. With the way you wrote the command it tried to connect to ssh service on your laptop, which clearly does not exist (or behind firewall). Not even sure why you are trying to save face, since you're anonymous.

OP Status: TOLD

try:
scp Laptop@Laptop:/file Server@server:/destination

Notice the added colons...