Error changing password AIX

Hello  Experts ,
 
I am ssh to a server to change password .  sudo passwd sr185218 (where sr185218 is user)  . I am able to fire the command manually and no error but while trying to run same command from shh getting error i.e. not able to change password on AIX Machine .

ssh logs and error is given below
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++debug1: Next authentication method: password^M^M
sr185218@ibm5403's password: ^M
debug1: Authentication succeeded (password).^M^M
debug1: channel 0: new [client-session]^M^M
debug1: Requesting no-more-sessions@openssh.com^M^M
debug1: Entering interactive session.^M^M
debug1: Sending environment.^M^M
debug1: Sending env LANG = en_US^M^M
debug1: Sending command: /home/sr185218/sr185218.sh^M^M
Error changing password for "sr185218".^M
Changing password for "sr185218"^M
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0^M^M
debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0^M^M
debug1: channel 0: free: client-session, nchannels 1^M^M
Transferred: sent 2088, received 3648 bytes, in 0.0 seconds^M^M
Bytes per second: sent 44153.9, received 77142.5^M^M
debug1: Exit status 6^M^M
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Could you please advice ...
Sanjeev RaghavAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

woolmilkporcCommented:
Try

ssh -tt ... ...
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Sanjeev RaghavAuthor Commented:
Thank you very much  Sir ,

It really helped me a lot .   Appreciating from core of my heart .


Regards
Sanjeev Raghav
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.