Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. # Copy\Move file
  2. cp ./source ./dist
  3. mv ./source ./dist
  4.  
  5. # Send a file from local to remote
  6. scp -i ~/.ssh/privateKey file.zip user@dnsName:~/
  7.  
  8. # Connect to a remote via ssh
  9. ssh -i ~/.ssh/privateKey userName@dnsName
  10.  
  11. # Change owner of a file
  12. chown userName:userGroup ~/filePath
  13.  
  14. # Start\Stop systemd service
  15. systemctl stop serviceName
  16. systemctl start serviceName
  17.  
  18. # Status of systemd service
  19. systemctl status
  20.  
  21. # Generate SSH key pair
  22. ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
  23.  
  24. # Space usage
  25. du -cha --max-depth=1 /var/lib | grep -E "M|G"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement