LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   AIX (https://www.linuxquestions.org/questions/aix-43/)
-   -   SSHPASS for AIX 6.1 (https://www.linuxquestions.org/questions/aix-43/sshpass-for-aix-6-1-a-4175596149/)

czumelzu 12-26-2016 08:13 AM

SSHPASS for AIX 6.1
 
Hi guys,

I need to install sshpass in my AIX6.1 server.
I would like to know how can I find it to install it in my server and do some tests.
Can anyone give me a hand? I've been diving in the internet and I can't find the information.
Thanks in advance.

TB0ne 12-26-2016 11:42 AM

Quote:

Originally Posted by czumelzu (Post 5646382)
Hi guys,
I need to install sshpass in my AIX6.1 server. I would like to know how can I find it to install it in my server and do some tests. Can anyone give me a hand? I've been diving in the internet and I can't find the information.

Did you look at their website?
https://sourceforge.net/projects/sshpass/

The source code is there, which includes installation instructions within the .tar.gz file. What are you stuck on? And why can't you just use the standard ssh keyswap, and eliminate the need for any passwords/utilities-to-deal-with-passwords in your script?

czumelzu 12-26-2016 12:01 PM

Hi TB0ne,

Actually, after I post the thread I found that same site.
Well, this is the thing, I need to connect to a remote SFTP server in which they only support SFTP, they dont accept SSH direct, so that is why the only option is to use SSHPASS, because I need that a bash do the connection.
Thanks for the clarification about the source of the application.

Regards,

czumelzu

TB0ne 12-26-2016 12:24 PM

Quote:

Originally Posted by czumelzu (Post 5646452)
Hi TB0ne,
Actually, after I post the thread I found that same site. Well, this is the thing, I need to connect to a remote SFTP server in which they only support SFTP, they dont accept SSH direct, so that is why the only option is to use SSHPASS, because I need that a bash do the connection. Thanks for the clarification about the source of the application.

No worries, but you can still easily do a key swap and use sftp. SSH/SFTP/SCP are all using the underlying SSH keys/protocol/port. These instructions:
http://www.tecmint.com/ssh-passwordl...-5-easy-steps/

...give you a nice how-to. Even if you don't have admin rights remotely, you can send your key via email to the remote administrator, and have them insert the key into the .ssh directory for you. SSHPASS isn't the 'standard' way to script for SSH/SFTP/SCP, but is a workaround.

You can even use an expect script, which will 'answer' the prompting for user/password.
http://www.perzl.org/aix/index.php?n=Main.Expect

NevemTeve 12-27-2016 11:53 PM

I don't know this program, but I can assure you that OpenSSH contains sftp functionality (both server and client), also it is able to generate and use ssh-keys.

It might be already installed by the vendor, even if not the latest version (say 5.x or 6.x instead of the recent 7.4p1), that's why I always compile it from source.

Edit: is this 'sshpass' a shortcut to avoid using ssh-keys? Don't take it. If you cannot create file $HOME/.ssh/authorized_keys on the remote side, ask the administrator of that computer to create it.

Michael AM 01-22-2017 03:56 AM

If you would be interested in trying OpenSSH-7.4 for AIX (copies existing keys and creates missing keys in /var/ssh/etc - so it can be installed side-by-side with IBM packaging of OpenSSH. Note: some old clients may not work with OpenSSH-7.4.

Curious: see http://www.aixtools.net/index.php/OpenSSH

And, if you are maybe interested in ftps (secure ftp, initiated as client with ftp -s) take a look at http://www.rootvg.net/content/view/791/88/


All times are GMT -5. The time now is 07:18 AM.