What is the fastest way to upload the big files to the server - file-upload

I have got dedicated server and file about 4 GB to upload on the server. What is the fastest and most save way to upload that file to the server?

FTP may create issues if the connection will be broken.
SFTP will have the same issue as well.
Do you have your own computer available through internet public IP as well?
In that case you may try to set up a simple HTTP server (if you have Windows - just set up the IIS) and then use some download manager on dedicated server (depends from OS) to download the file through HTTP (it can use multiple streams for that) or do this through torrent.
There're trackers, like http://openbittorrent.com/, which will allow you to keep the file on your computer and then use some torrent client to upload the file to the dedicated server.

I'm not sure what OS your remote server is running but I would use wget it has a --continue from the man page:
--continue
Continue getting a partially-downloaded file. This is useful when
you want to finish up a download started by a previous instance of
Wget, or by another program. For instance:
wget -c ftp://sunsite.doc.ic.ac.uk/ls-lR.Z
If there is a file named ls-lR.Z in the current directory, Wget
will assume that it is the first portion of the remote file, and
will ask the server to continue the retrieval from an offset equal
to the length of the local file.
wget binaries are available for GNU/Linux / Windows / MacOSX / dos:
http://wget.addictivecode.org/FrequentlyAskedQuestions?action=show&redirect=Faq#download

Related

Guacamole SFTP not working for larger files

I am using guacamole to connect to remote devices over RDP for Windows machines and SSH for Linux. Now I would like to enable SFTP support for the connections so I enabled the option 'Enable SFTP' in the guacamole connection settings.
The problem is SFTP is working for smaller files (<3KB), creates 0KB files for slightly larger files (3KB-150KB) and raises internal error for larger files (>150KB). I checked for what file size SFTP is failing by trial, transferring files of different sizes to the remote machine.
In the screenshot, it can be seen that 'attendance.py' a smaller file of size 548 bytes is successfully transferred to the tmp folder in the Linux machine, but the other two files files are created as empty files. The pdf file I tried to move is close to 180KB, which raises a Internal Error. I checked if there is some dependency with this error and filetype but this problem occurs for all file formats. I have the same problem when transferring file to a windows machine configured with RDP protocol in the same guacamole server.
Can someone help me with this? Thanks in advance
Are you using a reverse Proxy?
I had the same problem by using nginx. It seems it is by default not allowing files greater than 1MB.
I could change that at nginx to any size and now it works.
For nginx look for: client_max_body_size
If you are not using nginx, i would take a look at the webserver config. Remember, you using some sort of a webserver and a filelimit is there usualy very much needed.

Accessing external hard drive after logging into a remote machine using ssh command

I am doing an intensive computing project with a super old C program. The program requires a library called Sun Performance Library which is a commercial ware. Instead of purchasing the library by myself, I am running the program by logging onto a Solaris machine in our computer lab with the ssh command, while the working directory to store output data is still on my local Mac.
Now, a problem just occurred: the program uses large amount of disk space to save some intermediate results and the space on my local Mac is quickly filled (50 GB for each user prescribed by the administrator). These results are necessary for the next stage of computing and I cannot delete any of them before it finally produce the output data. Therefore, I have to move the working directory to an external hard drive in order to continue. Obviously,
cd /Volumes/VOLNAME
is not the correct way to do it because the remote machine will give me a prompt saying
/Volumes/VOLNAME: No such file or directory.
So, what is the correct way to do it?
sshfs recently added support for "slave mode" which allows you to do this. Assuming you have sshfs on Solaris (I'm not sure about this), the following command (ran from your Mac) will do what you want: dpipe /usr/lib/openssh/sftp-server = ssh SOLARISHOSTNAME sshfs MACHOSTNAME:/Volumes/VOLNAME MOUNTPOINT -o slave
This will result in the MOUNTPOINT directory on the server being mounted to your local external drive. Note that I'm not sure whether macOS has dpipe. If it doesn't, you can replace it with one of the equivalent solutions at How to make bidirectional pipe between two programs?. Also, if your SFTP server binary is somewhere else, substitute its path.
The common way to mount a remote volume in Solaris is via NFS, but that usually requires root permissions.
Another approach would be to make your application read its data from stdin and output its results to stdout, without using the file system directly. Then you could just redirect the data from/to your local machine through ssh. For instance:
ssh user#host </Volumes/VOLNAME/input.data >/Volumes/VOLNAME/output.data

how do I download a file in my current directory in ssh?

I'm looking right at the file I want to download in my current directory. wget wants a FULL url, I don't know what the full url is. im in directory /usr/local/lib/ and want to download php.ini.
I am using putty to log into my web server, and when i say donwload i want to download it from the web server to my pc
Firstly, forget URLs, and forget wget - this file isn't going to be accessible over the world wide web (if it is, your security is seriously broken).
However, if you can see it on SSH, you can probably (depending on security policies on the server) access it by using the same credentials over SCP.
On the command-line, using the PSCP program which comes with PuTTY that would look something like:
pscp user#server.example.com:/usr/local/lib/php.ini .
Or you could use a graphical client like WinSCP or FileZilla (which supports SFTP, which is another SSH-based protocol; use sftp://server.example.com as the server to connect to), if you're on a Windows desktop.
Use pscp which is included with PuTTY
If you are on Linux:
scp user#server:/path2file/file path-on-localpc

Programmable ftp server

We have a need to set up a ftp server. Many clients will upload files regularly. Each client will use a different ftp account. We will be called by an external system to provision a new client - we can either take username/password from the external aystem or generate them and pass them back. We will probably want to create a directory per client for them to upload files.
When a client uploads a file, we want to be notified, process the file, and pass it on to another external system (then rename or otherwise identify the file as processed)
So I am after suggestions for a ftp server that can have accounts added programmatically. Ideally, it would also handle the directories and new-upload notifications, but we can do these in other ways.
This would be on Red Hat Linux (ideally), or Solaris is an option.
Google says RedHat 9 Comes with vsftpd installed.
https://security.appspot.com/vsftpd.html

server to server transfer

Need to transfer 1 file from old host with no SSH access to a new host in which I do have SSH access. Having a hard time figuring this out. Looking for a simple answer if there is one. And also trying to avoid the slow upload times from my local machine, hence the reason for server to server transfer needed.
Are you able use FTP? You could use that to transfer the files.
If you have the URL of the file you want to move from your old host, you can use the wget command in your SSH terminal. You can use this for any file extension, or folders if you want.
For example, if you want to move http://www.yourhost.com/file.zip to your new host, you would SSH into the folder you want to download move this to, and type:
wget http://www.yourhost.com/file.zip