Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
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.
You can use either SCP or SFTP. SFTP is more convenient. Just run the syntax...
Code:
sftp user@address
You'll be prompted for a password. Once in, you'll want to get a list of the commands that you can use with SFTP. At the >sftp part just type in help, and it'll show you a list of commands. Most common are put and get.
why dont you copy to a temporary folder using your standard rsync (as you did before)
then just have a sh script that is owned by root then how you want to run this script is up to you, can have a cron job which will go in, copy to the /etc location and chmod it...
You can use the .ssh/authorized_keys file to eliminate the need for a password in a script.
An alternative is to use keychain. You could edit your .bash_profile file adding something like
keychain id_dsa
. ~/.keychain/$HOSTNAME-sh
You would be prompted once for a password when logging in the first time after a reboot.
Also, I'm not sure if you have system wide keys in /etc/ssh/ whether the scp commamd will work even if root can't login.
---
I just had another idea. Instead of having a cron job that copies files to remote systems, have cron jobs in the remote systems that pulls the files from the central host. You could pull them from a user setup solely for the purpose of distributing files. The home page of this psuedo user would contain an .ssh/ directory and the remote systems would be copying from a user account so your no root login restriction wouldn't be a problem.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.