title: How can I input password in advance with SSH?
body: <p>I often operat my remote vps.I write some script to simply my work.But every time after the line of ssh command,I have to input the password manually.How can I provide the password in the script and so that it will work on automatically,though I know it is not safe but my aim is just for convience.
  I have tried many ways.
  To be detailed,if I have a vps with the configuration as flows:</p>
  <blockquote>
  <p>Protocol=SSH</p>
  <p>Host=122.122.122.122</p>
  <p>Port=22</p>
  <p>UserName:root</p>
  <p>Password:mypassword</p>
  </blockquote>
  <p>I will write a script as flowers to connect the vps:</p>
  <pre><code>#!/bin/sh
  ssh -p 22  root@122.122.122.122
  #Other command flowers
  </code></pre>
  <p>Then I run the script.Before other command runs,I have to type the password.</p>
  <blockquote>
  <p>root@122.122.122.122's password:</p>
  </blockquote>
  <p>So I wonder if I have any solution to avoid typing password manually.</p>