In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "how to use SSH and SFTP protocols". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's ideas to study and learn "how to use SSH and SFTP protocols".
An unnecessary but important step is to ensure that your accessible system is secure. In my case, I plan to visit it only in the workplace, so I can limit the IP address to which I can access. Even so, you still need to adopt safety measures as much as possible. Once you set up this system, people all over the world will immediately be able to try to access your system. This is very surprising and frightening. You can find this through the log file. I suspect that there are probe robots doing their best to search for systems that do not have security measures. A few years ago, I decided to configure another computer so that I could access it at work to transfer the files I needed. The most basic step to do this is to ask your network provider (ISP) to provide a fixed address.
Soon after I set up the system, I didn't think this kind of access was of much use, so I turned it off so I didn't worry about it anymore. However, as long as it is set up, it is useful to use SSH and SFTP in the home network.
Of course, there is a necessary condition that this other computer must already be turned on, and it doesn't matter whether the computer is logged in or not. You also need to know its IP address. There are two ways to know. One is to access your router through a browser. In general, your address format is similar to 192.168.1.254. Through some searches, it is easy to find the systems that are currently powered on and connected to eth0 or wifi. How to identify the computer you are looking for can be a challenge.
An easier way to find this computer is to open shell and type:
Ifconfig
The command will output some information, and the information you need is after inet, which looks similar to 192.168.1.234. When you find this, go back to the client computer where you want to access the host and type:
Ssh gregp@192.168.1.234
For the above command to work properly, gregp must be the correct user name on the host system. You will be asked for his password. If you type the correct password and user name, you will connect to this computer through the shell environment. I confess that I don't use SSH very often. I use it occasionally, and I can run dnf to update computers other than the ones I often use. Usually, I use SFTP:
Sftp grego@192.168.1.234
I need a simple way to transfer a file to another computer. It is more convenient and takes less time than flash sticks and extra equipment.
Once the connection is established, SFTP has two basic commands, get, to receive files from the host, and put, to send files to the host. Before connecting, I often move to the folder I want to receive or transfer on the client side. After connecting, you will be in a top-level directory, such as home/gregp. Once the connection is successful, you can use cd as you would on the client, changing your work path on the host. You may need to use ls to confirm your location.
If you want to change your client's working directory. Use the lcd command (that is, local change directory). Similarly, use lls to display the contents of the client working directory.
What should you do if you don't have the directory name you want on the host? Use mkdir to create a new directory on the host. Or you can copy all the files in the entire directory to the host:
Put-r thisDir/
This creates the directory on the host and copies all its files and subdirectories to the host. This kind of transmission is very fast and can reach the upper limit of hardware. Do not encounter network bottlenecks as they do in Internet transmission. To see a list of commands you can use in a SFTP session:
Man sftp
I can also use SFTP in the Windows virtual machine on my computer, which is another advantage of configuring a virtual machine instead of a dual system. This allows me to move files in and out of the Linux part of the system. I only need to use a client in Windows.
You can use SSH or SFTP to access any device connected to your router via a network cable or WIFI. Here, I use an application called SSHDroid that can run SSH in passive mode. In other words, you can use your computer to access Android devices as hosts. Recently I also found another application, Admin Hands, whether your client is a tablet or a mobile phone, can use SSH or SFTP operation. This app is great for backing up and sharing photos on your phone.
Thank you for reading, the above is the content of "how to use SSH and SFTP protocols". After the study of this article, I believe you have a deeper understanding of how to use SSH and SFTP protocols, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.