How to access server from SSH

First step to make Git Repository in server is login server through the SSH connection.

You can use any type of SSH connection tool like Bitvise SSH or Git Base.

I have connected though GIT Base, We need username, Domain name or Ip and Password of Root user to access server.


Creating File and Working in this file


$ nano index.html

It will create index.html file

we can insert text and information on that file.

Vim create or edit file in Vim

$ vim prakash.txt


it will create file name prakash.txt, we  can now insert(write) text in to the file.


it will run file to insert mode.

after finishing updating information.


Changing the name of a file

[server]$ mv file1.txt file2.txt

Delete a file using SSH rm command

rm myFile.txt

This will match all files starting with ‘myFile’ and ending in ‘.txt’ and delete them.

To delete a whole folder and its content recursively, you can use:

rm rf foldername/

Delete All file in the folder

To delete all files/folders in the current directory, without deleting the directory itself, you would need to use:
rm rf *

Delete a file without asking for permission with SSH

rm -f myFile.txt

Delete a file using WildCard

This will delete all .txt files

rm -f *.txt

Delete all files and the directory with SSH rm

rm -rf /path/to/directory

Delete file and display information

rm -v myFile.txt

Delete file while being prompted for it

rm -i myFile.txt

Directory from Remote host to the Local host

copy directory from remote system to local system


scp -r <user>@<remote_host>:<remote_dir> <local_dir>

Example :

$ scp -r d:

$ scp -r    F:/jpy


~/www/JOBP/vendor1 = Server file location

F:/jpy = Local location