Langsung ke konten utama

How To Use SSH Command


Introduction

In this tutorial we will discuss what SSH and 14 commands (commands) are most often used in SSH. By understanding this syntax, you will find it easier to use the Linux terminal and know how to use SSH on a PC.

is - Show directory contents (list the names of files).
cd - Change Directory.
mkdir - Create a new folder (directory).
touch - Create a new file.
rm - Remove a file.
cat - Show contents of a file.
pwd - Show current directory (full path to where you are right now).
cp - Copy file/folder.
mv - Move file/folder.
grep - Search for a specific phrase in file/lines.
find - Search files and directories.
vi/nano - Text editors.
history - Show last 50 used commands.
clear - Clear the terminal screen.

What you need 

Things you must prepare before starting this guide:

  • Have access to the Terminal


Step 1 - Access the remote server 

Before you start, you are advised to have a virtual server with a new state first, so that if you accidentally make a mistake and delete something accidentally, you can immediately restore it to its original state easily.

SSH stands for Secure Shell, a protocol used to connect to the system remotely.

The basic commands that you can use are:

ssh user@serverip

This command connects you to a server that has a serverip IP address and user username. Another way you can use it is to use ssh serverip, in this way the shell will understand that you are trying to contact the same user you used when logging in now.

After you enter this command, you will be asked to fill in the password (if this is the first time you have connected, you will be shown a message that the server you have contacted has not been identified, type yes in the command line).

Yes, that's the only way, now you are connected and can continue reading this guide on how to manage your files via Terminal! If you want to exit the remote server and return to your local computer, just type exit on the command line.

Step 2 - Study the command 

In this step, we will try directly all the commands that you will learn!

IMPORTANT This can be applied to all commands in the shell. When writing arguments for the command (syntax / command), for example, cd 'Folder One' (where folder names contain 2 separate words), you must enter the name of the folder in quotation marks. The cd Folder One command (without quotes) will not work properly because the shell will think of the command as 2 arguments ("Folder" and "One").


  1. ls - This command is used to display all files and directories. We recommend that you use this command with the -l option, so that it will be ls -l, so that all files are displayed neatly and accompanied by detailed information about each of these files. Another option that can be used is -a, which also displays all files, accompanied by hidden files / directories (dot files with a dot in front of them, for example: the .ssh directory).
  2. cd - This command is used to "run" between directories (cd is an example of "change directory"). After displaying all the files and directories with ls, you can choose the directory you want to run. For example, there is a home directory that you want to enter. Enter the cd home command and you will move from your current location to the "home" directory. You can use ls again to display files & directories in the new directory. You can also type the full address into a directory if, for example, you want to go to a directory with a deeper level. You can use (for example) the command cd home / TestDirectory / Another Directory. In this way, you will go directly to the directory called "Another Directory". Use the command cd ... (there are spaces and 2 points after cd) to move up 1 level (in the example, we will move back to the "Test Directory" directory from the "Another Directories" directory).
  3. mkdir - This command is used to create a new directory (stands for "make directory"). This command will create a new directory with the name that you specify, for example, mkdir Folder New will create a new directory with the current Folder name in your current directory. 
  4. touch - This command is used to create a new file with a certain extension. For example, touch FileBaru.txt will create a "txt" file called FileBarudi in your current directory (the extension can be of any type you want, even you can create a file without any extensions at all), such as touch File New. 
  5. rm - This command is used to delete certain files / directories. For example, rm File New will delete the New File file that we have created before. If you want to delete a directory and all the directories in it, use the New rm -r Folder, this will delete the "New Folder" folder and all the folders in it. 
  6. cat - This command is used to display the contents of a file. For example, cat info.txt will bring up the contents of the file to your screen. Another example, cat info.txt info2.txt> mergedinfo.txt will combine 2 files into one ("info.txt" and "info2.txt") and write the contents of the file that is combined into the file "mergedinfo.txt".
  7. cp - This command is used to copy files and folders. The command is: cp [option] source destination. Basically, you can type directly the file that you want to copy in the source section. Whereas you can replace the destination with the destination address / folder / file. Now, if you write a destination that does not yet exist, for example, you have the original file filelama.txt and make filebaru.txt as the destination, then bash will immediately copy the file and copy it with a new name. In addition, here are some options that you can use with the cp command: cp -f source destination - Force copy (copy) process by deleting destination files if needed. cp -i source destination - Will give you a warning message before overwriting the file. cp -u source destination - update option. Only copies if the source file is newer than the destination file. cp -n source destination - Will not copy if the file already exists (does not overwrite). cp -a source destination - This option will archive files. 
  8. mv - This command works in the same way as cp, but the difference is that mv will move your files, not copy them. This command can also be used to rename files (rename). If we take the same example from the cp command, (in our current directory, there is 1 file oldfile.txt) and we type this command: mv oldfile.txt newfile.txt then bash will rename the file name oldfile.txt to newfile.txt. 
  9. grep - This command looks for values ​​in files / folders. For example: the grep 'bag' file will search for the word 'bag' in the file called "file". grep will bring up all the lines containing the word. For example, if there is a line containing the phrase 'There is a bird over Budi's head', then the line will be displayed because there is a phrase bag in the sentence. 
  10. find - This command is used to find folders for files that are included in the specified criteria (name, size, file type). For example: find. -name "* .html". This request will display all the files in your current directory that have an extension / suffix ".html" (note the use of an asterisk "*" in the command we entered, it is called a wildcard whose function is to convey bash that no matter what name file before the extension ".html", the important thing is that the file has the extension ".html". 
  11. vi / nano - This command is used to enter into the text editor. For example, nano newfile will create a new file called "newfile" and directly enter the nano editor or edit the file "newfile" (if it already exists) with nano editor. The same thing applies to the vi command, which will activate another editor named vi. IMPORTANT the nano text editor is not the default editor like vi, you have to install it before you use it.
  12. history - This command is used to display commands that have been used previously. For example: history 20 will display as many as 20 commands that were previously entered in the Terminal. 
  13. clear - This command is used to delete all text from your Terminal screen. 

Conclusion Hopefully this tutorial is quite clear to you and can make you really understand the basic SSH commands and how to use them. We recommend that you view this page for more detailed information about the commands described in this tutorial and more!

Komentar

Postingan populer dari blog ini

GramEasy V3.0 Full Nulled

GramEasy V3.0 Nulled is a stand-alone application. This makes it possible and gives you the best way to increase your Instagram account with more likes, followers, comments, unfollows and direct messages than before. Feature: Instagram Account Multi Activity Automatic activity log Many Targets: tags, locations, followers, followers, likers, commentators Tags & Locations: Targeting by tags allows you to like and / or comment on media posted under Tags or Locations, and / or follow users who post those media Followers: allows you to follow users who follow the Username added in your settings added in your settings (Username), and / or like and / or comment on the latest media posted by those users. In addition, you can also target your own followers (all users who follow your Instagram account) The following: allows you to follow the user followed by the User Name added in your settings added in your settings (Username Followers), likes and / or comments on the latest media posted by...

NinjaGram 7.4.4 Cracked - Instagram Bot Free Download

NinjaGram - number 1 Instagram bot in the world. This is universal marketing software that helps process all Instagram information automatically, saves a lot of time, gives you thousands of followers and helps you get more from this very popular image sharing site! Inactive website: http://ninjapinner.com/ninjagram-instagram-bot-2/ Features - Create task lists by searching photos / users with tags, keywords, user followers, user friends, news, links, etc. - Automatic subscription - Automatic subscription (from which you can exclude the user you signed X days ago). - Auto likes (likes new photos with tags, likes all photos with tags, etc.). - Superlikeking! Like 5 recent photos for all users from the list - Autocommenting by comments from the file. - Like the last photo of a user when subscribing. - Installation delay. - Black list - Proxy support. - Import - export account from text file. - And much more ... License Key NinjaGram v7.4.4 AWGN0-R0700-SGW6-K8NHA-437YK-2 More Version Ninja...

Jarvee 2.0.8.2 Full Cracked – Social Media Automation Tools

Schedule Your Posts and Grow All Your Social Accounts 10 Times Faster Than Before! Jarvee 2.0.8.2 Full Cracked does the work of the entire social media team that ensures the success of your online brand. 24/7 without lunch breaks. JARVEE is sure for you, if your goal is to automate all your Instagram, Facebook, Twitter, Google+, LinkedIn, Pinterest, Tumblr and Youtube accounts. Jarvee 2.0.8.2 Full Cracked Tags jarvee cracked 2018 jarvee cracked reddit jarvee cracked version jarvee crack download jarvee nulled jarvee instagram cracked massplanner cracked jarvee free download FEATURES Schedule all your social media updates for publishing in the future: Find the right time for your content with Mass Planner and post it on Facebook, Google+, Twitter, Pinterest and LinkedIn. Automatically follow people in your niche: Find and follow your Twitter / Pinterest / Google+ / Instagram account automatically with Mass Planner based on keywords for your niche. We do not advertise our presence in yo...