0

I currently connect to my UNIX installed on my remote server using Secure CRT. I have a script(sh) on my UNIX which generates a file. I need to su(switch user) before executing the script.

I then ftp to this server(using ftp commands in command prompt on windows) and get the file generated by the above shell script.

However, I would like to automate this process and create a windows .bat file which would connect me to the UNIX server, su and run the required shell script and fetch the file.

I have found that I cannot run the shell script on UNIX using ftp. Could you please suggest me alternate ways to automate this?

Thanks

Endoro
  • 37,015
  • 8
  • 50
  • 63
vib
  • 1
  • 1
  • 1
  • Have you used [putty](http://www.putty.org/)? – abiessu Jul 23 '13 at 14:06
  • Which portions of Secure CRT are you able to use? Can you use the `SFXCL` command line utility? – abiessu Jul 23 '13 at 14:11
  • 1
    I've looked through the online docs and I don't see any way to apply `su` over this type of remote connection in an automated way. If you trust the security of it enough, you could try setting up a script on the remote machine that takes care of the `su` part while you call that script remotely as non-root. But I would do everything possible to hide and secure such a script, such as make it a dotfile, name it something that doesn't sound like a script, apply `chmod 700 myboringscript` or `chmod 600 myotherscript`, etc. – abiessu Jul 23 '13 at 14:37
  • In that case, see whether you can use sudo on the remote side instead of su. (If your remote UNIX side is a commercial Unix, it’s likely to not be installed already, and maybe your policy doesn’t permit installing more software. But I thought maybe this helps you.) – mirabilos Jul 24 '13 at 15:11
  • Thanks for your help guys :) I created a script on secure CRT and while running the application using the bat file, I'm calling this script using the CRT command line options. – vib Jul 27 '13 at 04:17

1 Answers1

0

Thanks for your help guys :) I created a script on secure CRT and while running the application using the bat file, I'm calling this script using the CRT command line options

vib
  • 1
  • 1
  • 1