I do not have a background in TCL. I was told that one of our FTP scripts is required to be converted to SFTP for security reasons. This script basically goes to an FTP server and grabs a file and puts in in another location.
Is there an sftp package available for tcl that I can implement without having to rewrite the entire script in a language I know nothing about.
If I understand your requirements correctly, you want to modify an existing TCL script that makes an FTP call, and you wish to replace that FTP call with an SFTP call – is that right? If so, and assuming the TCL script simply makes an
execcall to FTP, then it should be a very straightforward change to switch to SFTP. See here for example.If on the other hand, your existing script is using the TCLlib FTP package, then I’m not so sure if there is such a straightforward change, as I’m not aware of an SFTP package in TCL. I would imagine it is tricky to get the FTP package working over TLS/SSL. Of course, you could use Expect – there are dozens of examples online.