2

I am creating sessions on PuTTyCM with macro mode enabled where I can send password and also post login commands. Initially the server to which I am logging was taking the password as userID (due to network latency I guess). I corrected this problem by increasing connection timeout. I am not able to give post-login commands even though I tried various command timeouts. Anyone please tell me how to get this working

7 Answers 7

5

When creating connection put username@ip_address to address field, this will solve issue when puttycm uses password as login.

2

I have the same problem:

I have a problem with the configuration commands:

when I enter an ssh command in the command 1 box such as “ssh server1.step3.b1q.example.com” then when I run it the ssh command is simply ignored. We then tried tricking it by placing an echo at the front (echo 'ssh server1.step3.b1q.example.com';) but it is still ignored. We also tried (sudo sh -c ssh server1.step3.b1q.example.com). The only way to do it is by putting identical ssh commands in two consequtive boxes like this:

command box 1:ssh server1.step3.b1q.example.com

command box 2:ssh server1.step3.b1q.example.com

This solves the first problem but my problem is that you only have 5 command boxes and the fifth one is neccessary! But it is being taken up by the second box being in use. How can I only have a single command line for ssh server1.step3.b1q.example.com. in other words is there another way to trick putty CM into NOT ignoring the first SSH? which brings us back to the first problem.

1

Increase only "password" value in macro option (i use 1750ms).

Explaination : with this values : Connection:1000 Password: 1050 Login:900 Command: 1250

  1. Puttycm wait 1000ms after the connection command to start logincommand
  2. Puttycm wait 900ms after the login command to start password command
  3. Puttycm wait 1050ms after the password command to start the 1rst"Command" command
  4. Puttycm wait 1250ms after the 1rst command to start the 2nd "Command" command
  5. Puttycm wait 1250ms after the 3rd command to start the 4 "Command" command
  6. etc.

The issue appears only when time to validate password by the server is too long.

So the value to increase if 1rst command is not visible is : password command. I changed this value and i have no more problem.

0

to add on Max Drogobitskiy's answer, when create/edit new connection, enter the following in your Host:

example:

Host: [email protected] -pw pa55w0rd

sample from my server:

Using username "jboss".
Using keyboard-interactive authentication.
Last login: Wed Jul 31 10:33:44 2013 from xxx.xxx.xxx.xxx
jboss@cpp-app01:~>

Note: Remember to disable the Macro login if you use above method, else your password will be visible.

1
  • Welcome to SuperUser and thank you for your participation. Usually, if you'd like to build off of an existing answer, you can do so via a comment or an edit, which are privileges you can earn as you participate. Have a look around and enjoy your stay. Jul 31, 2013 at 10:37
0

To solve this issue increase timeout of command on login macro option. Restart PuttyCM. Now post login command will work!

0

The following macro options helped me.

Connection:1000 Password: 1050 Login:900 Command: 1250

Also, under the LOGIN MACRO, we need to provide user id as COMMAND 1 and password as COMMAND 2. COMMANDS 3,4,5 can be anything you wish. Hope this helps.

0

We can username separated by hostname. This work beautifully:

Steps:

Open the Connection

Then go to Configuration -> Click Connection

In the text box Host Enter username@servername

Note: I tried setting Macro Options -> timeout but it did not work all the times. If there are many connection to be created timeout will be very cumber some approach.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .