Good day to everyone. I’m writing this post on a sunny Sunday after the exam.
Let’s make the descriptions first. SSH (Secure Shell): A protocol that allows users to control remote computers/servers. It was created as an alternative and secure way to links to unencrypted telnet. Ensures that all messages that are transmitted and received are encrypted.
FTP (File Transfer Protocol): Is the file transfer protocol for Turkish. It is useful to transfer files between the server and your computer. For example, when you want to send a file to your website, file submission is made with this protocol.
We’re opening a new console and writing ftp.
If you install ftp on your system, this will appear that the program is turned on. If it is not installed, the command required for installation will appear.
ftp> open ftp.ornekdomain.com
After entering the command (if the information provided is correct, 230 OK. message returns ), primarily ftp username and password. After successfully logging in, we are ready to transfer files to the remote server.
Here’s what commands we can use. [
- ls – Lists the files on the server we are connecting to.
- cd – Allows you to switch between folders.
- get – Used to pull files from the server to your computer. Ör: ftp> get notes.txt
- mget – Used to pull multiple files from the server. Ör:
ftp> mget visaNotes.txt finalNotes.txt
- put – Used to send files from our own computer to the server we connect to. Ör: ftp> put database.db
- mput – Used to send multiple files to the server. Example: ftp> mput picture1.jpg picture2.jpg
- del – Used to delete files from the server. We can delete the file we named by the LS command by calling it the name of the ph.P> del file.
- close – Used to close the connection we open. For example, you have two different servers, you connect to one with ftp and pull files, you can close the current connection with this command and connect to the other server.
- exit – ftp is used to turn off. After you turn it off, you switch to the console screen.
You may be asked for approval for your actions on the server. You can continue processing by using the required letter Y/N (yes/no).
These are described for use through the console. You can also do these without writing code with programs with a graphical interface (FileZilla, cyberduck, Fireftp).
It’s really helpful in connecting to your website with ftp and receiving and sending files. The same process can be done within the server, but when there are more advanced and useful methods (scp/rsync ) it makes more sense to use them. Let them be the subject of a different article 🙂 Plenty of coded days…