Copy files using telnet commands


















Manually this runs fine but I require to run this through automation. I tried placing these commands in testcase. I have also tried using bat file to run these 2 commands but the bat file could only launch a telnet session it couldn't execute the second command. You could use a program like "socket" or "nc" to open a raw TCP session to the server port and send the command that way, capturing the output. That would allow your automation but note that the "telnet protocol", if it is actually in use, will include extra handshake bytes at the start.

They're easy to strip out, though, and may not even be there depending on the OS and the program listening on that port. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. All forum topics Previous Topic Next Topic. Exalted Contributor. Your best bet is to install a secure shell product on all devices. Then you can actually share public keys and copy between sytems with the the scp command.

Thanks for the Information. However right now we do not worry about security. We just need to copy files. Nevertheless we may use your information at a later stage in the project. Honored Contributor. Improve this answer. AdminBee I am able to connect the device via telnet command and able to see the files that I want to get and upload again into device.

Probably your device does not have a ssh or ftp server running. Well I don't know that.. You can also use sz to send the files through the terminal. You'll need it on both sides. PRdeepKumawat I extended the answer with an example.

Show 2 more comments. I have no ssh or ftp or etc on the device. So, I do next: telnet a. Anthon 74k 41 41 gold badges silver badges bronze badges. Kaz Kaz 6, 1 1 gold badge 21 21 silver badges 39 39 bronze badges.

Try with rcp command. Use man rcp for more information in case you want to automate transfers. By the way, you do know this is very insecure , right? YoMismo YoMismo 3, 1 1 gold badge 13 13 silver badges 29 29 bronze badges. MyroslavN MyroslavN 1 1 bronze badge. I have done this now by these methods: Create ftp server by installing solerwinds on window system. HalosGhost 4, 10 10 gold badges 31 31 silver badges 40 40 bronze badges. There are also netcat implementations for Windows, e.

While it may not be possible with only telnet, it is possible with telnet and netcat. Some of the examples above just referenced using netcat, but there have been times when I was on an old machine that was still in production that had telnet but not netcat.

In this case, you can set netcat to listen on a newer, remote machine and telnet the file to it. Note that this works with text files. If you have a binary file of some sort you would need to do further manipulation on both ends. Telnet just gives you a remote terminal session.

Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow.



0コメント

  • 1000 / 1000