Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question

migrated from stackoverflow.com Sep 28 '12 at 16:45

This question came from our site for professional and enthusiast programmers.

add comment

5 Answers

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

share|improve this answer
add comment

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.

share|improve this answer
add comment

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

example:

Host: username@10.10.100.10 -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.

share|improve this answer
    
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. –  Raystafarian Jul 31 '13 at 10:37
add comment

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

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.