scp

How can I use `scp` to deploy a website's `.htaccess` file?

I am currently using the following command to upload my site content: scp -r web/* [email protected]:site.com/ This works great except that the .htaccess file is not sent. Presumably, this is because it's hidden. I have tried adding a second line to send the file explicitely: scp -r web/.htaccess [email protected]:site.com/.htaccess This ...

How do I SCP a File programatically using C

What would be the best way to do an scp or sftp copy in a unix environment using C. I'm interested in knowing the best library to use and an example if at all possible. I'm working on a solaris server with the sun tools installed. ...

How to pass password to scp?

Hello, I know it is not recommended, but is it at all possible to pass the users password to scp? I'd like to copy a file via scp as part of a batch job and the receiving server does of course need a password (no, I cannot easily change that to key-based authentication). TIA Argelbargel ...

How do I copy a file to a remote server in python using scp or ssh?

I have a text file on my local machine that is generated by a python script run daily in cron. I would like to add a bit of code to have that file sent securely to my server over ssh. Help. ...

Using Mercurial, is there an easy way to diff my working copy with the tip file in the default remote repository

When using mercurial, I'd like to be able to diff the working copy of a file with the tip file in my default remote repository. Is there an easy way to do this? I know I can do an "hg incoming -p" to see the patch sets of changes coming in, but it'd be nice to just directly see the actual changes for a particular file that I'd get if I...

Map SSH drive in Windows

Does anyone know of a good (hopefully free) tool that can be used to map a SSH server as a Windows network drive (i.e. SCP)? EDIT: SFTP not supported EDIT2: Windows File Sharing/Samba not supported ...

Change permissions upon uploading with scp

I am uploading files to my shell account using scp. As I need different permissions on the server than on my computer, I'd like to have a way to easily change the permissions upon upload without needing to ssh to the account and change them manually. ...

scp via java

What is the best method of performing an scp transfer via the Java programming language? It seems I may be able to perform this via JSSE, JSch or the bouncy castle java libraries. None of these solutions seem to have an easy answer. ...

How to best capture and log scp output?

I am trying to capture output from an install script (that uses scp) and log it. However, I am not getting everything that scp is printing out, namely, the progress bar. screen output: Copying /user2/cdb/builds/tmp/uat/myfiles/* to server /users/myfiles as cdb cdb@server's password: myfile 100% |******************...

How to scp in python?

What's the most pythonic way to scp a file in Python? The only route I'm aware of is os.system('scp "%s" "%s:%s"' % (localfile, remotehost, remotefile) ) which is a hack, and which doesn't work outside linux-like systems, and which needs help from the Pexpect module to avoid password prompts unless you already have passwordless SSH ...

How Do I Copy Up To An SSH Host All Folders and Files Except Certain Ones?

Using the Linux command line, I use the scp command to copy up all the files and folders from a certain directory. However, I don't like to consume wasted bandwidth for copying up things I rarely change like my tiny_mce folder. What's the trick to copy up everything but skip a short list of folders? ...

Error Trying To Make Easier rsync Command

I normally use scp to copy stuff, but now I'm trying to get used to the more powerful rsync command. It helps me use less bandwidth by copying up only files that have changed. However, rsync has a lot of complex parameters, so I thought, hey, I'll just make a little Bash script that makes it easy for me, and call the command 'rscp'. So, ...

Transferring files over SSH

I'm SSHing into a remote server on the command line, and trying to copy a directory onto my local machine with the "scp" command, but the remove server gives back this "usage" message: [Stewart:console/ebooks/discostat] jmm% scp -p ./styles/ usage: scp [-1246BCEpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [...

How do I push a file from a Linux box to a Windows Box?

How do I push a file from a Linux box to a Windows Box? Which versions of Windows have a built-in SSH server that a Linux box can "scp" (secure copy/ssh) to. I'm looking at freesshd right now. Any more ideas? ...

Best way to copy millions of files between 2 servers

I have roughly around 5 million small (5-30k) files in a single directory that I would like to copy to another machine on the same gigabit network. I tried using rsync, but it would slow down to a crawl after a few hours of running, I assume due to the fact that rsync has to check the source & destination file each time? My second thoug...

Is BitTorrent good for copy files between servers in the workplace?

I have 1 source server that contains about 30GB of files that I want to copy to 7 other servers. I currently SCP the files over to the first four servers and when that transfer is complete SCP to the last 3 servers. Would using BitTorrent be faster to distribute the files to all 7 at once? The connection internally is already fast and...

Create local backup when editing remote files via netrw in vim

I work with many files remotely using vim and the netrw plugin. I also keep timestamped backups by changing the &backupext (found in the documentation). While working in a remote file (scp://server//folder/file.txt), I noticed that when I save it, a backup isn't even being made. Is there a way I can have a backup automatically made loc...

SCP from one server to another without password prompt

What is the best way of doing SCP from one box to the other without prompting for password? There are two servers Server A 10.152.2.10 /home/oracle/export/files.txt Server B 10.152.2.11 /home/oracle/import/ If I want to transfer the files using scp from Server A to server B without being prompted to enter a password [running thi...

Unable to use scp with a bash alias

The code does not work scp ~/Desktop/favicon.ico nameOfBashAlias:/public_html/mySite/templates/blog/ The alias is alias nameOfBashAlias='ssh [email protected]' How can you solve the problem? [edit] Is a similar code to the following code possible, like running many bashes? scp ~/Desktop/favicon.ico (nameOfBashAlias)>:/pub...

Unable to scp from my server to my computer

The following code does not work scp /home/username/public_html/site/pictures/* myUsernameAtMyMac@myIpAddress:/home/Masi/Desktop/ I have "Allow only essential services" in my Mac's firewall. How can you solve the problem? [edit] I get the following error after I have "Remote Login" in the list of allowed services. I also allowed "A...