During the Cygwin installation, you must choose to install OpenSSH from the Net section. Linux and Mac OS X come with SSH already installed on the system. This is because SSH is a UNIX system, and Linux and OS X are derived from UNIX. If you have Windows 10 with the Anniversary Update, you can install the Windows Subsystem for Linux which comes with SSH preinstalled.
$ ssh
cd .
.
will move you up one directory.
cd
ls will list all of the files and folders in your current directory. ls –l will list the contents of the directory along with additional information such as size, permissions, and date. ls-a will list all the contents including hidden files and folders.
scp /localdirectory/example1.
txt
cp example1.
txt example2.
txt will create a copy of example1.
txt called example2.
txt in the same location.
cp example1.
txt
mv example1. txt example2. txt will rename example1. txt to example2. txt. The file will stay in the same location. mv directory1 directory2 will rename directory1 to directory2. The directory’s contents will remain unchanged. mv example1. txt directory1/ will move example1. txt into directory1. mv example1. txt directory1/example2. txt will move example1. txt into directory1 and rename it to example2. txt
rm example1. txt will delete the file example1. txt. rm –I example1. txt will delete the file example1. txt after prompting you to confirm. rm directory1/ will delete directory1 and all of its contents.
chmod u+w example1. txt will add the write (modify) permission to the file for the user (u). You can also use the g modifier for group permissions or the o for world permissions. chmod g+r example1. txt will add the read (access) permission to the file for the group. There are a large list of permissions that you can use to secure or open various aspects of your system. [3] X Research source
mkdir newdirectory will create a new subdirectory called newdirectory. pwd will display your current directory location. who shows who is logged into the system. pico newfile. txt or vi newfile. txt will create a new file and open the file editor. Different system will have different file editors installed. The most common are pico and vi. You may need to use different commands if you have a different file editor installed.
man
Create the key folder on your computer by entering the command $ mkdir . ssh Create the public and private keys by using the command $ ssh-keygen –t rsa You will be asked if you would like to create a passphrase for the keys; this is optional. If you don’t want to create a passphrase, press Enter. This will create two keys in the . ssh directory: id_rsa and id_rsa. pub Change your private key’s permissions. In order to ensure that the private key is only readable by you, enter the command $ chmod 600 . ssh/id_rsa
$ scp .
ssh/id_rsa.
pub
Create an SSH folder on the remote computer, if it does not already exist: $ mkdir . ssh Append your key to the authorized keys file. If the file does not exist yet, it will be created: $ cat id_rsa. pub » . ssh/authorized_keys Change the permissions for the SSH folder to allow access: $ chmod 700 . ssh
If you connect without being prompted for the password, then the keys are configured correctly.