Tag Info

Hot answers tagged

7

WinSCP supports SSH keys. In /etc/ssh/sshd_config set PasswordAuthentication No PermitRootLogin without-password Copy your public key to /root/.ssh/authorized_keys (there will be a similar file inside of ec2-user's home directory). If you want to just copy that type sudo mkdir -p /root/.ssh sudo cp /home/ec2-user/.ssh/authorized_keys /root/.ssh/ ...


5

It might be an invalid .bashrc file. In my case I found it was referencing another recently deleted script, and so failed.


3

The easiest way without chains: download file from Server-A to Server-C using scp download file from Server-C to Server-B using scp download file from Server-B to local PC using WinSCP


3

Edit /etc/ssh/sshd_config, change these lines PermitRootLogin forced-commands-only PasswordAuthentication no To: PermitRootLogin yes PasswordAuthentication yes Set a password for root and restart sshd. passwd service sshd reload Disclaimer: I don't recommend this at all, but since you asked I'll give you the gun - you decide what to do with it.


3

Use port forwarding. WinSCP, for example, has an option to create a connection through a ssh tunnel and it uses port forwarding. Still, since you need to tunnel through two hops, you cannot use it. I would propably first create a ssh connection to server-B which has a tunnel to server-C. You could use plink.exe for this (part of putty): plink.exe -l ...


3

On the very same page you linked to there is a put command (http://winscp.net/eng/docs/script_commands#put). Didn't you even look?


3

It's a tftp server, so you'll need to use a tftp client.


2

I guess your directory has the wrong owner/group, though the file itself has. What WinSCP is probably complaining about is that it can't set the directory’s timestamp, which is normally also updated if you change a file in it.


2

Chroot sets / to be that directory. The users home directory is apparently set to /var/www/websites/site1 so when WinSCP logs in, it tries to start in the user's home directory which on the actual system would be /vhosts/wild.domain.com/var/www/websites/site1 Presuming this stefanos user only accesses the system through sftp, it would be safe to set the ...


2

I ran into this problem when I forgot to open the extra ports that Passive FTP mode requires. Basically, you need to open/allow a range of ports through your firewall in addition port 21 that you have already opened. It looks like you are using Microsoft's FTP Server. Microsoft has a support page with instructions here. When I did this, I opened port 21 ...


2

I don't think Cygwin scp is corrupting the files. I think you need to run dos2unix on your text files before or after copying them to the Linux system. I'm not sure, but you probably need to do same for files going into your jar files before zip'ing them.


2

I think the documentation explains it pretty clearly: http://winscp.net/eng/docs/scriptcommand_synchronize You want to use the synchronize command instead of a get command. When the first parameter is local, changes from remote directory are applied to local directory. When the first parameter is remote, changes from the local directory are applied ...


1

According to this site: http://forum.filezilla-project.org/viewtopic.php?f=2&t=17604, the problem is a bad username/password combination.


1

The following is what worked for me created a file called script.text. Following is the content of script.txt open ftp://uname:pwd@ftpserver_url then from the command prompt executed the following statement c:\ "path_to_winscp\WinSCP.exe" /console /script=c:/script.txt


1

Have you tried using something like ftp://user:pass@ftp.example.com as the address ? You script can then build this uri depending on you environment. This example uses sftp but ftp should be similar.


1

I had a similar problem. If the sshd_config file permissions change then this is likely the problem. It should be 644. see http://www-01.ibm.com/support/docview.wss?uid=isg3T1012888


1

You can safely restart an ssh server whilst connected to it. It specifically keeps your connection open to help avoid locking you out. But you should always open a second connection and check that you can initialise a new connection before closing the first one! It sounds to me like that's one of two problems: sftp-server falling over for some reason ...


1

Try this if you have root : iptables -A PREROUTING -t nat -p tcp -i eth0 --dport *PORT* -j DNAT --to 127.0.0.1:22 Where PORT is a port you can access normally through your proxy, what will happen is that on your server you will get rerouted to that port FROM within your server. So basically you bypass your proxy. Most of the time I use the backup http ...


1

You can always write a PHP script to handle uploads.


1

Is Unison what you want? Unison is a file-synchronization tool for Unix and Windows. It allows two copies of a collection of files and directories to be stored on different hosts (or different disks on the same host), modified separately, and then brought up to date by propagating the changes in each replica to the other. Unison can deal with ...


1

Please have a look at Microsofts SyncToy It provides a intuitive gui in case your not much of a fan of the shell. It has about the same features as robocopy, though - I'm not sure which requirement of yours is not met... it does 2way sync on file level, latest timestamp wins.


1

ROBOCOPY a command line utility can do that (and more). It is included with Windows Vista, Windows 7 and Windows Server 2008. Available in the Windows Resource Kit for various other versions (Windows 2000, Windows 2003 etc).


1

WinSCP has support for SSH tunneling. To enable it: Click on "Advanced options" check box. in the configuration tree click on "Connection/Tunnel" and here add the intermediate hop server. in the configuration tree click on "Session" and configure the destination server. Save the session for later user by clicking "Save..." You can chain the rest of ...


1

Is this transfer going through a Firewall or Intrusion Prevention device? They can easily cut connections based on flaky signatures, weird flags, etc. it's also possible a Antivirus scanner could pull off the same thing.


1

Some options: Try one problem file on its own Try using another client (FileZilla?) Try via a command line ?


1

Can you use another program than WinSCP for testing and set debugging / verbose mode on? Or maybe WinSCP has that too. It might give you good information about why the connection was dropped.


1

Are the files that you get disconnected on quite large ? Perhaps you need to configure keepalive in winscp. In the Login Dialog->Connection Section turn keepalives on by selecting one of the options. The default 30s should be sufficient for the time between keepalives.


1

How can I edit files and save them from Winscp in folders that require sudo be written before any modifying changes. Given this requirement, that you are logged in as an unprivileged users with sudo access, there is no direct way to do this with winscp connection. What you could do is enable SSH access to root with a key and then setup key-based ...


1

Add user to the www-data group: $ useradd -G www-data user Set proper permissions on the target folder: $ chown -R user.www-data /home/user/www $ chmod -R g+w /home/user/www The two above commands set the file/directory ownership properly and then grant the group owner write permissions.


1

MAKEDEV is usually used to create device files easily. Passing it -d will allow you to specify a directory to create them in. MAKEDEV -d /srv/ssh/chroot/dev mem null port ... For sh just use cp -a, and ldd to see what libraries it may need.



Only top voted, non community-wiki answers of a minimum length are eligible