Jump to content

Putty/Plink batch question


anauj0101

Recommended Posts

I am trying to use Plink from a windows box to automate a telnet SMTP mail message. I use this command line and it just opens the session but does not issue the commands from the script. Can someone tell me what im doing wrong I have been looking for 2 days thanks.

plink -telnet SMTPserver.com -P 25 myscriptname

Link to comment
Share on other sites

is the script on your end or the server end?

If the file is on the server, then im not to sure whats wrong, but if the file is on your end, then your going about this the wrong way.

plink -telnet SMTPserver.com -P 25 myscriptname

the 'myscriptname' atm will only run the command 'myscriptname' on the server in the default directory that you are connected to, so if the file isnt on the server thats not going to do to much for you.

So what you need to do, is use the -m:

-m file   read remote command(s) from file

so you if file is local you should use:

plink -telnet SMTPserver.com -P 25 -m myscriptname

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...