I am trying to upload a large file from my linux server via SSH to a ftp server. (i only have ftp access to this remote server)
Here is the command i am trying to do
put myfile.zip
Result:
150 Opening BINARY mode data connection for myfile.zip
The transfer starts but upon getting to about 10gb uploaded, i get this error. and the file deletes itself from the ftp server.
451 Transfer aborted. Input/output error
I was wondering if there is an alternative or if i am doing something wrong? or even if there is a way i can resume the upload..
The protocol has no limitations, but most servers have default upload limits out-of-the-box. There are also timeouts on concrete servers applicable.
You said you can SSH to it, didn't you? So what about scp to it, or to mount remote folder as sshfs aka sftp?
Related
I have transferred or copied a files from local machine to Server successfully using OS Process Sampler but unable to transfer a file from One remote server to another remote server on windows.
Can anyone explain me the process or share the steps or command which are being used to do the same.
Thanks
If you have OpenSSH servers on both machines you can use SSH Command sampler to execute scp command for transferring a file from one remote machine to another remote machine
In case of Windows you might have to provide the full path to scp.exe binary like:
C:\Windows\System32\OpenSSH\scp.exe
The exact configuration may differ depending on source/destination paths, whether public key authentication is enabled or not, etc.
Also SSH Command sampler doesn't come with JMeter, you will need to install it as a part of SSH Protocol Support bundle using JMeter Plugins Manager
I have a webpage which contains the button to upload a file. My requirement is, when user chooses the file to upload and click the submits it, the file should get transferred to an SFTP server. My question is, do I need a SSH client installed on the client machine for achieving this?
I thought of uploading it to my http server as a temp file first and then to the SFTP server from there, but then what's the purpose of SFTP on the first place as the file will be transmitted to server as unencrypted.
JSP is a server side technology. If JSP is going to be involved, then the code has to run on the server.
My question is, do I need a SSH client installed on the client machine for achieving this?
No. The server has to do the work.
I thought of uploading it to my http server as a temp file first and then to the SFTP server from there
That's how you would have to do it.
There's no way to interact with the SFTP protocols directly from client side code in a webpage.
then to the SFTP server from there, but then what's the purpose of SFTP on the first place
Good question: But you decided to use that technology, so that's up to you.
as the file will be transmitted to server as unencrypted.
To secure communications between the browser and the HTTP server, use HTTPS instead of plain HTTP.
I'm working on a project that requires me to run my code on a remote Unix server, that is not available to connect to directly (you first have to log in to the "gate" node and then to this server).
What's really bad is that they disabled key authentication, so each time I need to ssh into it, I have to type in my password twice. It's really annoying and I wonder what's the best way to transfer my local modifications of source files to this server, compile and run them without having to provide those passwords so many times.
I have no sudo access to any of those servers (neither to this "gate", nor to this target server). Any ideas on how to make the whole process more efficient?
EDIT: Martin Prikryl provided a great answer below, but it's suitable for Windows and I'm on a Mac :) I guess it might be a good thing to have it documented here also for *NIX systems.
You are looking for SSH tunneling.
WinSCP SFTP client supports one-hop SSH tunneling natively.
See the Tunnel page on WinSCP Advanced Site Settings dialog.
I assume that after you transfer the file, you need to open SSH terminal to compile the file.
You may be able to make use of WinSCP Console window for that step.
Alternatively, if you need/want to use a real SSH terminal client, make use of an existing SSH tunnel, created by WinSCP, and connect with PuTTY (or any other SSH client) over it.
In the Local tunnel port of WinSCP Tunnel page, select a fixed port number (instead of the default Autoselect). In PuTTY enter "localhost" to Host Name and the selected port in Port.
(I'm the author of WinSCP)
I just want to delete my repository in my local pc because the size is too big. My idea is keep all file in svn server and delete svn on local pc so that all file is backup on server. Please help.
Via FTP or Samba you could map a network drive to the repository's location on the server. This would allow you to directly access the files (edit a project in an IDE, etc) and commit directly to the server without any local hard drive space consumed.
Be aware, if you are using your repository for code, compiling will most likely be severely limited by your network connection.
I want to create a service that will allow me to display documents and media (think PDF and JPEG) that are stored in the filesystem of a remote server to which I connect by ssh. X11 forwarding doesn't cut it because it's too slow. Instead I want to design a protocol that will copy files from the remote system on demand, then display them.
My question is twofold:
How do I acquire a port on the remote machine? Since I may have multiple connections going, I cannot simply use a single well-known port—I will have to allocate a port dynamically.
Once I have my port, how do I communicate it to the display applications on the remote machine? SSH X11 forwarding communicates by setting the DISPLAY environment variable, and agent forwarding communicates by setting the SSH_AUTH_SOCK environment variable. Perhaps I can do something creative with a remote command?
I welcome any ideas.
Do you really need a remote port? If you can ssh into the remote machine, why not run a command and send data back over the ssh command, like rsync, Mercurial, Git, and so on do. SSH can provide an 8-bit clean connection, so it's just like having a socket connection.
To be clear, what i am suggesting is:
SSH from origin to the destination
In the SSH session, run a command on the destination that writes data to its standard output
The standard output is sent over the SSH connection from destination to origin
Collect the data that emerges from the standard output of SSH on the origin machine
There is then no need to open a particular port on either the origin or the destination.
Indeed, if what you really want is "a protocol that will copy files from the remote system on demand", how about SCP, SFTP, or rsync over SSH?