Last updated on Sep 7, 2024, 19:56 by mokubo3
SFTP (Secure File Transfer Protocol) allows you to upload files to the Hills server securely. Follow the steps below to upload files or directories.
[~] > sftp <username>@hills.ccsf.edu <username>@hills.ccsf.edu's password: Connected to hills.ccsf.edu. sftp> lcd ~/Source/workspace/hills_html sftp> cd public_html/ sftp> mput index.html Uploading index.html to /students/<username>/public_html/index.html index.html 100% 9612 432.0KB/s 00:00 sftp> exit [~] >
Open a terminal and run the following command to start an SFTP session:
sftp <username>@hills.ccsf.edu
Replace <username>
with your CCSF username. Once connected, you'll be in SFTP mode.
To upload a file from your local machine to the server, use the put
command:
put local_file
Replace local_file
with the path to the file you want to upload.
To upload an entire directory, use the -r
option for recursive upload:
put -r local_directory
This will upload the directory and all its contents to the current directory on the server.
To download a file from the server to your local machine, use the get
command:
get remote_file
Replace remote_file
with the name of the file you want to download.
To end the SFTP session, type:
exit
If you have any questions, reach out to the CS Tutor Squad.