0

I have a raspberry pi set up for a class, that I am supposed to use to access a Linux server on campus. I can SSH into the server completely fine. When I'm using the command line locally, however, I can't scp a file from my local machine to the server. As according to my teacher, I should use:

scp <Path-to-File> <Logname>@servername.school.edu 

He notes that if I my local username is the same as that of my username on the server, then I don't need to include the Logname. Either way that I've tried, and when using sudo, it only creates a file in the /home/username folder named the same as the server address i.e. /home/username/<Logname>@servername.school.edu.txt.

The pi and the server are on the same network, and other users in my class have been able to do this successfully. I appreciate any help.

1 Answer 1

2
scp <Path-to-File> <Logname>@servername.school.edu: 

The last argument is user@server:/remote/path. You can omit /remote/path but it's the colon (:) that informs scp the argument is not a local filename.

On the other hand if you ever need scp to treat user@server: as a local filename containing a colon, make it a (full or relative) path, like ./user@server:.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.