Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hope this is in the correct section! Sorry if not..
This one is driving me nuts! I've been trawling through the Forums in various places and I can't seem to find the answer..
All I want to do is set up a script to make an sFTP connection (ie. to run from CRON, no user interaction) to a customer using key-pair authentication and Password, download some files and then delete them from the remote location. The download and delete should be fairly easy but I'm struggling on the connection..
Everywhere seems to be saying use key_pair on it's own but this customer requires the password in addition to that (this is NOT a password on the key BTW..!). We don't have SSHPASS installed (and I'd like to avoid that if possible) and it is running on CentOS (as far as I am aware).
I've not tried but I assume the OP's customer is using two factor authentication. Since version 6.2 you can use the AuthenticationMethods directive whereby you can require multiple methods. As the OP stated this is not the same thing as a passphrase. I am guessing this is how the server is configured.
AuthenticationMethods publickey,password
There is also RequiredAuthentications2 directive which is available in Redhat/CentOS in version 6 but not sure where else.
Just read a bit more on "expect" - so, like SSHPASS, is something that would need to be installed.
Is there any way to accomplish this scripting without having to install anything more - ie. in native scripting (such as BASH)? I have limited access to the server I am using and installing new software would need to go through significant internal processes (and therefore delays)..
Is there any way to accomplish this scripting without having to install anything more - ie. in native scripting (such as BASH)? I have limited access to the server I am using and installing new software would need to go through significant internal processes (and therefore delays)..
Not really. The easy way in that regard is to have expect or sshpass do their thing.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.