Commands wich need for ssh connect to remote server


ssh user@000.0.000.000 -p22 # connect to server
ls # show folders and files
ls -a # show hide files
cd folder_name # open folder
nano file_name # edit file
rm -f file # delete file
rm -rf dir # delete folder and all inside
mkdir name_folder # create folder

Work with Postgresql
ssh user@000.0.000.000 -p22 "pg_dump -h localhost -U user_db name_db | gzip -c" > sqlbackup.sql.gz # Create dump your DB from remote server on your computer

Comments