

(stty -echo read passwd stty echo echo $passwd tar -cz foo.*) \
WINSCP SERVER TO SERVER PASSWORD
Here's a modified version of Willie Wheeler's answer that transfers the file(s) via tar but also supports passing a password to sudo on the remote host. But I've found ansible to be super useful for administering remote servers, so installing it will surely bring you other benefits beyond deploying files.
WINSCP SERVER TO SERVER INSTALL
P.S., I realize that saying "just install this fabulous tool" is kind of a With the concise invocation being: cd sourcedir & \Īnsible -i hostname, -b -m copy -a "src=. Here's an example that is specific and fully specified, assuming the directory on your local host containing the files to be distributed is sourcedir, and that the remote target's hostname is hostname: cd sourcedir & \

Technically, you can configure Ubuntu to allow remote login directly as root, but this feature is disabled for a reason, so I would strongly advice you against doing that. Generally, working in the root account should be an exception, not a rule - the way you phrasing your question makes me think maybe you're abusing it a bit, which in turn leads to problems with permissions - under normal circumstances you don't need super-admin privileges to access your own files. scp -r folder/ sudo mv /some/folder /some/folder/requiring/permsĪnother solution would be to change permissions/ownership of the directories you uploading the files to, so your non-privileged user is able to write to those directories. A workaround is to use scp to upload files to a directory where your user has permissions to create files, then log in via ssh and use sudo to move/copy files to their final destination. This warning is not shown during subsequent connections to this server.You're right, there is no sudo when working with scp. If this is the first time you have used WinSCP, and you are sure you’ve entered the correct configuration details, click Yes on the Warning dialog box. See Generate RSA keys with SSH by using PuTTYgen for information about setting up public and private keys. Note: You can use a private key to log in to the cloud server.

WinSCP stores configurations in Stored Sessions. To save the configuration, click the Save button next to the Login button.Įnter a configuration name that is easy for you to remember, for example, server-ORD-local23. Note: For the host name, enter the Internet Protocol (IP) address of your server and change the port to match your sshd port.Įnsure that the Connection Type is set to sftp. Configure sshd (the ssh/sftp server) to listen to a port that is different from the default.
