<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: sshpass: Login To SSH Server / Provide SSH Password Using A Shell Script</title> <atom:link href="http://www.cyberciti.biz/faq/noninteractive-shell-script-ssh-password-provider/feed/" rel="self" type="application/rss+xml" /><link>http://www.cyberciti.biz/faq/noninteractive-shell-script-ssh-password-provider/</link> <description>Every answer asks a more beautiful question.</description> <lastBuildDate>Fri, 10 Feb 2012 19:55:56 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: Ed</title><link>http://www.cyberciti.biz/faq/noninteractive-shell-script-ssh-password-provider/#comment-67885</link> <dc:creator>Ed</dc:creator> <pubDate>Thu, 09 Feb 2012 22:03:24 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1732#comment-67885</guid> <description>Thanks for this solution. Where I work they don&#039;t have home directories installed on remote hosts so I can&#039;t set up public keys. I would like a solution like ssh-agent where I typed in my password once (so it&#039;s held in memory), and the agent supplied it when I ssh somewhere.</description> <content:encoded><![CDATA[<p>Thanks for this solution. Where I work they don&#8217;t have home directories installed on remote hosts so I can&#8217;t set up public keys. I would like a solution like ssh-agent where I typed in my password once (so it&#8217;s held in memory), and the agent supplied it when I ssh somewhere.</p> ]]></content:encoded> </item> <item><title>By: ashish badola</title><link>http://www.cyberciti.biz/faq/noninteractive-shell-script-ssh-password-provider/#comment-64501</link> <dc:creator>ashish badola</dc:creator> <pubDate>Wed, 16 Nov 2011 13:30:45 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1732#comment-64501</guid> <description>Sir my laptop is stolen</description> <content:encoded><![CDATA[<p>Sir my laptop is stolen</p> ]]></content:encoded> </item> <item><title>By: __B__</title><link>http://www.cyberciti.biz/faq/noninteractive-shell-script-ssh-password-provider/#comment-64482</link> <dc:creator>__B__</dc:creator> <pubDate>Wed, 16 Nov 2011 04:58:29 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1732#comment-64482</guid> <description>&quot;It&#039;s not recommended&quot;, bla bla bla bla bla. Sometimes you need these solutions, even if they are risk.
Thanks for giving this option. I F*UCKING KNOW the best way is using ssh keys. But if you F*CKING CANT use them for some F*CKING REASON, this solution fits like a glove.
I tested with scp, and it works as well.</description> <content:encoded><![CDATA[<p>&#8220;It&#8217;s not recommended&#8221;, bla bla bla bla bla. Sometimes you need these solutions, even if they are risk.</p><p>Thanks for giving this option. I F*UCKING KNOW the best way is using ssh keys. But if you F*CKING CANT use them for some F*CKING REASON, this solution fits like a glove.</p><p>I tested with scp, and it works as well.</p> ]]></content:encoded> </item> <item><title>By: dan</title><link>http://www.cyberciti.biz/faq/noninteractive-shell-script-ssh-password-provider/#comment-63946</link> <dc:creator>dan</dc:creator> <pubDate>Fri, 28 Oct 2011 16:27:47 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1732#comment-63946</guid> <description>Is it really working on your distribution?
Only -p port is working on Opensuse.
ssh: Could not resolve hostname some.server.com:2222: Name or service not known</description> <content:encoded><![CDATA[<p>Is it really working on your distribution?</p><p>Only -p port is working on Opensuse.</p><p>ssh: Could not resolve hostname some.server.com:2222: Name or service not known</p> ]]></content:encoded> </item> <item><title>By: dan</title><link>http://www.cyberciti.biz/faq/noninteractive-shell-script-ssh-password-provider/#comment-63945</link> <dc:creator>dan</dc:creator> <pubDate>Fri, 28 Oct 2011 16:20:23 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1732#comment-63945</guid> <description>IT world is complex and there are situations where you simply can&#039;t use rsa keys.
Ii&#039;s stupid that ssh developers think just one way and not letting users chose what thay need to use.
I&#039;m now adding second account to dd-wrt router and since rsa keys are global there for all users I have to use password in bash to create reverse ssh tunnel.
My second account has /bin/false shell.
And finally this sshpass is not working for me. Not sure why.</description> <content:encoded><![CDATA[<p>IT world is complex and there are situations where you simply can&#8217;t use rsa keys.</p><p>Ii&#8217;s stupid that ssh developers think just one way and not letting users chose what thay need to use.</p><p>I&#8217;m now adding second account to dd-wrt router and since rsa keys are global there for all users I have to use password in bash to create reverse ssh tunnel.<br
/> My second account has /bin/false shell.</p><p>And finally this sshpass is not working for me. Not sure why.</p> ]]></content:encoded> </item> <item><title>By: Rich</title><link>http://www.cyberciti.biz/faq/noninteractive-shell-script-ssh-password-provider/#comment-61399</link> <dc:creator>Rich</dc:creator> <pubDate>Mon, 08 Aug 2011 15:41:40 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1732#comment-61399</guid> <description>You can always write a bash script and secure the credentials in an include file:
# Include the Login credentials:
. /path/to/credentials
# rsync using vars defined in credentials, e.g.:
rsync -r -a -v -e &quot;sshpass -p $SSH_PASSWORD ssh -l $SSH_LOGIN&quot; --delete /path/to/local/dir $SSH_HOST:/path/to/remotedir/</description> <content:encoded><![CDATA[<p>You can always write a bash script and secure the credentials in an include file:</p><p># Include the Login credentials:<br
/> . /path/to/credentials</p><p># rsync using vars defined in credentials, e.g.:<br
/> rsync -r -a -v -e &#8220;sshpass -p $SSH_PASSWORD ssh -l $SSH_LOGIN&#8221; &#8211;delete /path/to/local/dir $SSH_HOST:/path/to/remotedir/</p> ]]></content:encoded> </item> <item><title>By: arepalli</title><link>http://www.cyberciti.biz/faq/noninteractive-shell-script-ssh-password-provider/#comment-59615</link> <dc:creator>arepalli</dc:creator> <pubDate>Wed, 25 May 2011 09:15:46 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1732#comment-59615</guid> <description>Nice post</description> <content:encoded><![CDATA[<p>Nice post</p> ]]></content:encoded> </item> <item><title>By: Tyler</title><link>http://www.cyberciti.biz/faq/noninteractive-shell-script-ssh-password-provider/#comment-51461</link> <dc:creator>Tyler</dc:creator> <pubDate>Tue, 07 Dec 2010 23:03:42 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1732#comment-51461</guid> <description>Just put :[portnumber] after the location
Ex: $ sshpass -p &#039;t@uyM59bQ&#039; ssh username@server.example.com:2400</description> <content:encoded><![CDATA[<p>Just put :[portnumber] after the location<br
/> Ex: $ sshpass -p &#8216;t@uyM59bQ&#8217; ssh <a
href="mailto:username@server.example.com">username@server.example.com</a>:2400</p> ]]></content:encoded> </item> <item><title>By: t0kneneng</title><link>http://www.cyberciti.biz/faq/noninteractive-shell-script-ssh-password-provider/#comment-51330</link> <dc:creator>t0kneneng</dc:creator> <pubDate>Mon, 06 Dec 2010 02:31:34 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1732#comment-51330</guid> <description>I was wondering how to implement this on different port not default port 22...</description> <content:encoded><![CDATA[<p>I was wondering how to implement this on different port not default port 22&#8230;</p> ]]></content:encoded> </item> <item><title>By: Arete Vestige</title><link>http://www.cyberciti.biz/faq/noninteractive-shell-script-ssh-password-provider/#comment-42346</link> <dc:creator>Arete Vestige</dc:creator> <pubDate>Wed, 01 Jul 2009 15:41:32 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1732#comment-42346</guid> <description>Sometimes it is not possible to add the keys or advisable to do so.  sshpass is an excellent solution for large deployments of secure systems that prevents the innate issues of unauthenticated access.</description> <content:encoded><![CDATA[<p>Sometimes it is not possible to add the keys or advisable to do so.  sshpass is an excellent solution for large deployments of secure systems that prevents the innate issues of unauthenticated access.</p> ]]></content:encoded> </item> <item><title>By: MPerera</title><link>http://www.cyberciti.biz/faq/noninteractive-shell-script-ssh-password-provider/#comment-41507</link> <dc:creator>MPerera</dc:creator> <pubDate>Wed, 06 May 2009 23:51:12 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1732#comment-41507</guid> <description>This is what exactly I looking for.
All the servers I used ssh-copy-id. But recently one server replaced by 3rd party and they manage it and I do not have any write access login (no home directory). I run a script to rsync just two directories and last two weeks I had to do this manually since cron job filling.
My problem fixed by this solution.</description> <content:encoded><![CDATA[<p>This is what exactly I looking for.<br
/> All the servers I used ssh-copy-id. But recently one server replaced by 3rd party and they manage it and I do not have any write access login (no home directory). I run a script to rsync just two directories and last two weeks I had to do this manually since cron job filling.<br
/> My problem fixed by this solution.</p> ]]></content:encoded> </item> <item><title>By: KwangErn</title><link>http://www.cyberciti.biz/faq/noninteractive-shell-script-ssh-password-provider/#comment-38961</link> <dc:creator>KwangErn</dc:creator> <pubDate>Thu, 09 Oct 2008 21:43:58 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1732#comment-38961</guid> <description>On an extra note, one can clear the keychain (keychain --clear) on every login using .bash_profile just in case. ;)</description> <content:encoded><![CDATA[<p>On an extra note, one can clear the keychain (keychain &#8211;clear) on every login using .bash_profile just in case. ;)</p> ]]></content:encoded> </item> <item><title>By: KwangErn</title><link>http://www.cyberciti.biz/faq/noninteractive-shell-script-ssh-password-provider/#comment-38960</link> <dc:creator>KwangErn</dc:creator> <pubDate>Thu, 09 Oct 2008 21:41:55 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1732#comment-38960</guid> <description>Personally, I find keychain to be the best alternative. At least I know I&#039;m save from any possible cracking!
http://www.gentoo.org/proj/en/keychain/</description> <content:encoded><![CDATA[<p>Personally, I find keychain to be the best alternative. At least I know I&#8217;m save from any possible cracking!</p><p><a
href="http://www.gentoo.org/proj/en/keychain/" rel="nofollow">http://www.gentoo.org/proj/en/keychain/</a></p> ]]></content:encoded> </item> <item><title>By: Raj</title><link>http://www.cyberciti.biz/faq/noninteractive-shell-script-ssh-password-provider/#comment-38764</link> <dc:creator>Raj</dc:creator> <pubDate>Sat, 13 Sep 2008 08:47:22 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1732#comment-38764</guid> <description>I use this tool and it is safe. Here is my scenario
I&#039;ve a central backup server and I&#039;m the only person who logs in. Server is connected to internet and no services are running except ssh on vpn interface. I need to login to over 20 boxes collocated or leased in 5 data centers. With this tool I don&#039;t have to upload ssh keys to those boxes. So if any one of the production box got hacked, my backup server remain intact.</description> <content:encoded><![CDATA[<p>I use this tool and it is safe. Here is my scenario</p><p>I&#8217;ve a central backup server and I&#8217;m the only person who logs in. Server is connected to internet and no services are running except ssh on vpn interface. I need to login to over 20 boxes collocated or leased in 5 data centers. With this tool I don&#8217;t have to upload ssh keys to those boxes. So if any one of the production box got hacked, my backup server remain intact.</p> ]]></content:encoded> </item> <item><title>By: ram</title><link>http://www.cyberciti.biz/faq/noninteractive-shell-script-ssh-password-provider/#comment-38763</link> <dc:creator>ram</dc:creator> <pubDate>Sat, 13 Sep 2008 07:54:14 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1732#comment-38763</guid> <description>it is recommended for sererrs it may used in scripts,that is not comes under system history and you may given password for that script.</description> <content:encoded><![CDATA[<p>it is recommended for sererrs it may used in scripts,that is not comes under system history and you may given password for that script.</p> ]]></content:encoded> </item> <item><title>By: Miker</title><link>http://www.cyberciti.biz/faq/noninteractive-shell-script-ssh-password-provider/#comment-38761</link> <dc:creator>Miker</dc:creator> <pubDate>Fri, 12 Sep 2008 21:19:10 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1732#comment-38761</guid> <description>Web input filter changed the last line of my comment.
$ cat ~/.ssh/id_rsa.pub &#124; ssh hostname ‘mkdir .ssh; chmod 700 .ssh; cat&gt;&gt;.ssh/authorized_keys’</description> <content:encoded><![CDATA[<p>Web input filter changed the last line of my comment.</p><p>$ cat ~/.ssh/id_rsa.pub | ssh hostname ‘mkdir .ssh; chmod 700 .ssh; cat&gt;&gt;.ssh/authorized_keys’</p> ]]></content:encoded> </item> <item><title>By: Miker</title><link>http://www.cyberciti.biz/faq/noninteractive-shell-script-ssh-password-provider/#comment-38760</link> <dc:creator>Miker</dc:creator> <pubDate>Fri, 12 Sep 2008 16:30:14 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1732#comment-38760</guid> <description>I&#039;ve always done it using ssh-copy-id or the good ol manual way.
$ mkdir -p ~/.ssh  If it doesn&#039;t already exist
$ chmod 700 ~/.ssh
$ cd ~/.ssh
$ ssh-keygen -t rsa
$ cat ~/.ssh/id_rsa.pub &#124; ssh  &#039;mkdir .ssh; chmod 700 .ssh; cat&gt;&gt;.ssh/authorized_keys&#039;</description> <content:encoded><![CDATA[<p>I&#8217;ve always done it using ssh-copy-id or the good ol manual way.</p><p>$ mkdir -p ~/.ssh  If it doesn&#8217;t already exist<br
/> $ chmod 700 ~/.ssh<br
/> $ cd ~/.ssh<br
/> $ ssh-keygen -t rsa<br
/> $ cat ~/.ssh/id_rsa.pub | ssh  &#8216;mkdir .ssh; chmod 700 .ssh; cat&gt;&gt;.ssh/authorized_keys&#8217;</p> ]]></content:encoded> </item> <item><title>By: Dave</title><link>http://www.cyberciti.biz/faq/noninteractive-shell-script-ssh-password-provider/#comment-38759</link> <dc:creator>Dave</dc:creator> <pubDate>Fri, 12 Sep 2008 15:00:49 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1732#comment-38759</guid> <description>Wow... this is scary. I would never recommend this method to anyone! If you want to ssh using command line with no password prompt, just create your ssh key without a password.
Not only would ps reveal the password for your ssh key, but also it is stored in your history on the filesystem!</description> <content:encoded><![CDATA[<p>Wow&#8230; this is scary. I would never recommend this method to anyone! If you want to ssh using command line with no password prompt, just create your ssh key without a password.</p><p>Not only would ps reveal the password for your ssh key, but also it is stored in your history on the filesystem!</p> ]]></content:encoded> </item> <item><title>By: Robert de Bock</title><link>http://www.cyberciti.biz/faq/noninteractive-shell-script-ssh-password-provider/#comment-38758</link> <dc:creator>Robert de Bock</dc:creator> <pubDate>Fri, 12 Sep 2008 11:54:45 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1732#comment-38758</guid> <description>I don&#039;t agree to this trick, better use an ssh-agent and ssh-add. Check out this howto: http://meinit.nl/ssh-agent-trick
Regards, Robert de Bock.</description> <content:encoded><![CDATA[<p>I don&#8217;t agree to this trick, better use an ssh-agent and ssh-add. Check out this howto: <a
href="http://meinit.nl/ssh-agent-trick" rel="nofollow">http://meinit.nl/ssh-agent-trick</a><br
/> Regards, Robert de Bock.</p> ]]></content:encoded> </item> </channel> </rss>
