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.
CTRL + I
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
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:
Delete All file in the folder
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>
$ scp -r email@example.com:~/www/JOBP/vendor1 d:
$ scp -r firstname.lastname@example.org:~/www/JOBP/vendor1 F:/jpy
~/www/JOBP/vendor1 = Server file location
F:/jpy = Local location