You've successfully subscribed to Nicholas Workshop
Great! Next, complete checkout for full access to Nicholas Workshop
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.
Success! Your billing info is updated.
Billing info update failed.

Ssh With Password Saved

Nicholas Wong
Nicholas Wong

Ssh is a very convenient way to remotely command or control other devices. We use ssh to push commits to git server, to access remote server, and even to manipulate the content of our iphones and ipads. However it’s usually distributing to type your long and elusive password every time. Therefore here I would like introduce a way to create a steady relationship between your computer and the remote server you wanna connect with.

The principle is this, ssh connection establishments requires verification using the computer unique key of both devices. in order to simplify this step, we can generate a public key of your computer in advanced and which allows other to identify you. While you put that public key in the remote device as authorized key, you can kinda fast forward the process.

  1. open terminal and run ssh-keygen -t dsa
  2. open .ssh/id_dsa.pub and copy content inside
  3. open new tab in terminal and ssh server
  4. paste all content into ~/.ssh/authorized_keys
ssh-keygen -t rsa  
ssh b@B mkdir -p .ssh  
cat .ssh/id_rsa.pub | ssh b@B ‘cat >> .ssh/authorized_keys’
Unsorted

Nicholas Wong

Fullstack software engineer with strong background in computer science and extensive experience in software engineering and architecture. Studied in NYU, worked in Yahoo, Rakuten and Manulife.