Ftp saying `R:ICMP port unreachable` with special chars in file name when ftping to Windows - ftp

I am trying to transport a file from a Linux server to a Windows server using a cron job to kick off an ftp request. If the file is named archive-2015-11-11-2.tar.gz the ftp works great, however, when I copy this file under the name archive-2015-11-12-00:00:01.tar.gz and try to ftp from my Windows box I get the error > R:ICMP port unreachable. Is there a way I can transfer the file without renaming? I tried both get and mget but neither works.
Env
OS: Windows
Terminal: Cygwin

Colon is not a valid character in a Windows file spec. The error message may be misleading but if you're trying to create a file named archive-2015-11-12-00:00:01.tar.gz on a Windows box that will not work.

Related

pscp network error: connection timed out

NOTE I am running on windows 10, not linux.
pscp.exe has been downloaded and run in my \Users\Taylor folder. I turned off my firewall just in case that could be interfering. I am trying to download files to my local windows from a remote linux environment using the following input to command prompt:
pscp user#quanah.hpcc.ttu.edu:/home/user/*.ctl \Downloads
I also varied the local name as such:
pscp user#quanah.hpcc.ttu.edu:/home/user/*.ctl C:\Users\Taylor\Downloads
This has worked perfectly in the past (~ one week ago), but now I get the error: "Fatal: Network error: Connection timed out" - I know the server (quanah.hpcc.ttu.edu) is connected and fine because I can ssh to it via PuTTY. Any recommendations?
I'd make sure that once I get the dos shell going, I navigate to where pscp.exe is located and run your command from there, i.e.:
C:\Users\Taylor>pscp ...
I'd also go to the source directory on quanah.hpcc.ttu.edu, in your case, '/home/user/' and do 'pwd' to confirm full path
I'd also set my target directory to be where pscp.exe is located i.e. C:\Users\Taylor because I've had success with that; and not because that is the only way.

Cannot create file \\server\printer

I have a module in vfp9 running under windows 7 32bits, this module prints in a local printer using the command COPY FILE file.txt TO \\server\printer, locally works fine, but in other pc of the network doesn't work, the error cannot create file \\server\printer shows.
In windows xp, this works fine, but in windows 7 not, I guess is a permission, wich one? where I can find information about this? I disabed the option "disable sharing with password protection" in advanced config of network and I can see all the shared resources, disks and printers.
I appreciate any help
That's a very 'legacy' way of printing and I wouldn't rely on it. If you have to do it this way, try redirecting an LPT port and then copying to the LPT port. At a CMD prompt:
net use lpt3 \\server\printer /yes
Then in your application
copy file file.txt to lpt3

xdebug remote server and SFTP - cannot connect

I am trying to debug PHP files which sit on a remote server (on the same network) without success.
Here is my php.ini config for xdebug on the remote server where PHP and xdebug are installed:
xdebug.remote_enable=1
xdebug.remote_host=192.168.128.56
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_autostart=0
192.168.128.56 is the IP address of my PC on which my editor is installed.
I have tried to get this working with both Atom and Sublime Text 3 without success. I think that my path bindings may be incorrect.
I log into the remote linux machine using SFTP. I can then double click on php files in my application and they will open in my editor where I can work on them and save them. How can I set up the path bindings to debug these remote php files? I'm not sure what the second (local) part of the path binding should actually be? Do I need to add the location where the FTP software stores a temporary copy of the file I am working on as the local part of the binding?
I have tried the following:
URL - the address of where the app runs on the remote server:
e.g. http://www.mywebsite.com/testapp/
Path Binding - remote path to the application root on linux : path to the local copy of the files on my machine where the FTP software stores them:
e.g. /web/testApp/ : C:\Users\me\AppData\Local\Temp\scp18929\
I'm a little confused about how the path binding works, and what the values should be. Am I doing this correctly? Can this even be done?
If anyone can help that would be great.
Probably, the first thing to check is whether Xdebug actually tries to connect to your IDE. You can do that, by adding:
xdebug.remote_log=/tmp/xdebug.log
to your php.ini file. When you then initiate debugging, there should be information in the /tmp/xdebug.log file, where it will tell you where it tried to connect too, and whether the connection succeeded or failed.
If you get something like:
I: Remote address found, connecting to 192.168.128.56:9000.
E: Could not connect to client. :-(
That means that either your IDE wasn't listening for something, or that there is a firewall preventing an incoming connection, or that the IP address is incorrect.

How to download a file from my server using SSH (using PuTTY on Windows)

When I try downloading a file from my server onto my computer, it actually downloads the file onto the server.
(Note I am already SSH'd into my server before typing this command. I've watched tutorials on YouTube and people are using their terminal without SSHing into any particular server, however I don't think I can do this with PuTTY on Windows?)
scp -r -P2222 kwazy#mywebsite.example:/home2/kwazy/www/utrecht-connected.nl ~/Desktop/
The problem is that I am specifying the location to download the file as only ~/Desktop/
This creates a folder called Desktop in my server, instead of copying the files onto my local desktop.
I am able to use this command on Linux.
I have successfully download the folder onto my desktop:
I still need insight onto how I can do this on a Windows machine.
There's no way to initiate a file transfer back to/from local Windows from a SSH session opened in PuTTY window.
Though PuTTY supports connection-sharing.
While you still need to run a compatible file transfer client (pscp or psftp), no new login is required, it automatically (if enabled) makes use of an existing PuTTY session.
To enable the sharing see:
Sharing an SSH connection between PuTTY tools.
Even without connection-sharing, you can still use the psftp or pscp from Windows command line.
See How to use PSCP to copy file from Unix machine to Windows machine ...?
Note that the scp is OpenSSH program. It's primarily *nix program, but you can run it via Windows Subsystem for Linux or get a Windows build from Win32-OpenSSH (it is already built-in in the recent versions of Windows 10 and in Windows 11).
If you really want to download the files to a local desktop, you have to specify a target path as %USERPROFILE%\Desktop (what typically resolves to a path like C:\Users\username\Desktop).
Alternative way is to use WinSCP, a GUI SFTP/SCP client. While you browse the remote site, you can anytime open SSH terminal to the same site using Open in PuTTY command.
See Opening Session in PuTTY.
With an additional setup, you can even make PuTTY automatically navigate to the same directory you are browsing with WinSCP.
See Opening PuTTY in the same directory.
(I'm the author of WinSCP)
try this scp -r -P2222 kwazy#mywebsite.example:/home2/kwazy/www/utrecht-connected.nl /Desktop
Another easier option if you're going to be pulling files left and right is to just use an SFTP client like WinSCP. Then you're not typing out 100 characters every time you want to pull something, just drag and drop.
Just noticed /Desktop probably isn't where you're looking to download the file to. Should be something like C:\Users\you\Desktop
OpenSSH has been added to Windows as of autumn 2018, and is included in Windows 10 and Windows Server 2019.
So you can use it in command prompt or power shell like bellow.
C:\Users\Parsa>scp parsa#192.168.100.11:/etc/cassandra/cassandra.yaml F:\Temporary
parsa#192.168.100.11's password:
cassandra.yaml 100% 66KB 71.3KB/s 00:00
C:\Users\Parsa>
(I know this question is pretty old now but this can be helpful for newcomers to this question)
if you install git with git bash, you get SCP available on windows.
You can use WinSCP : https://winscp.net/eng/download.php
Or MobaXterm : https://mobaxterm.mobatek.net/download.html
It feels like FTP client. Also I don't remember setting up anything on my machine for this. It just fresh install and install SSH server (IDK if it matters though).
For MobaXterm :
If your server have a http service you can compress your directory and download the compressed file.
Compress:
tar -zcvf archive-name.tar.gz -C directory-name .
Download throught your browser:
http://the-server-ip/archive-name.tar.gz
If you don't have direct access to the server ip, do a ssh tunnel throught putty, and forward the 80 port in some local port, and you can download the file.
You can use the WinSPC program. Its access to any server is pretty easy. The program gives its guide too. I hope it's helpfull.
If you need something with GUI you can use FileZilla. it support SFTP.
It's perfectly working with ssh and you can even edit files and it will automatically upload the changes.

push file to remote system through telent using ruby

I have a remote embedded system which it is telnet-able. How can I download a binary file from the host to it? I can read file from the system, but have no idea how to write to it.
you probably want to do this with ftp
If there is no ftp server on the target system try using kermit

Resources