Guest User

Untitled

a guest
Apr 29th, 2016
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. (wherever it says url.com, use your server's domain or IP)
  2.  
  3. Login to new server as root, then add a deploy user
  4. ```bash
  5. sudo useradd --create-home -s /bin/bash deploy
  6. sudo adduser deploy sudo
  7. sudo passwd deploy
  8. ```
  9. And Update the new password
  10.  
  11.  
  12. Now login as that user
  13. ```bash
  14. ssh deploy@url.com
  15. ```
  16.  
  17. Make directory .ssh on the remote server and log out
  18. ```bash
  19. mkdir .ssh
  20. exit
  21. ```
  22.  
  23. Push your ssh key to the authorized_keys file on the remote server
  24. ```bash
  25. scp ~/.ssh/id_rsa.pub deploy@url.com:~/.ssh/authorized_keys
  26. ```
Add Comment
Please, Sign In to add comment