For a school project we are required to use PuTTY only for the semester, we have a specific host that we are supposed to connect to, to upload the files and PuTTY to run them.
I have successfully connected to the host using PSFTP but don't know how to upload my files. I can connect successfully to the host but that's where everything ends. The local file is located here:
C:\Program Files\PuTTY\mpi_hello.c
I have no idea how to upload my files to the host and running ls
only brings up the basic examples. And the destination file directory is:
/homes/01/c/student304
To be more specific I am trying to upload my local files to /homes/01/c/student304
using PSFTP, then run them from PuTTY.
The teacher will not show us how to upload files only how to run them once they're in the directory seeing as it's supposed to be a prequisite, but this is my first time ever using this software, so any help is greatly appreciated.
Best Answer
Does this tutorial from Purdue University help? Your teacher is (frankly) negligent in not showing you the basics, FWIW.
Anyway, the command to upload a file is
put
. So you would connect to the server and run:With
[filename]
being the actual name/path to the local file.This is an example from that tutorial page that shows you how to use various commands:
So using that as a guide, this is how we can transfer from the
C:\Program Files\PuTTY\mpi_hello.c
to/homes/01/c/student304
:On your local machine, CD to your local project directory here:
Or:
Now connect to the remote host and then run the following commands within PSFTP; the last line (
chmod a+rx mpi_hello.c
) is optional but it might be needed to allow the file to be read and executed by others:And that’s it! The file should be on the remote host at this location:
This stuff should work.
If you are still running into issues, review the tutorial from Purdue University for help. And if none of this helps? Please contact your teacher directly and ask them for further help. In fact, please share this answer with your teacher for reference.