-1

I am trying to SSH to a server using a username whose password is: Pa55w0rd12#45^78(

The command i tried are:

[manu@xxx ]$ ssh manu:Pa55w0rd12#45^78(@xxxxxxx
-bash: syntax error near unexpected token `('

[manu@xxx ]$ ssh manu:"Pa55w0rd12#45^78("@xxxx Password:

I have to follow the same command as this is in-product code and cannot be changed:

ssh username:password@server

Can anyone please direct me to a solution?

ilkkachu
  • 138,973
Manu
  • 11
  • 4
    Quoting the parenthesis like you did is the way to have the shell pass it on as-is. Are you sure the password is supposed to go there with the username? And not where the SSH client prompts for a password..? – ilkkachu Aug 19 '20 at 13:51
  • 4
    Read man ssh. That's not a valid way of specifying a password to ssh. Also read man ssh-copy-id. – waltinator Aug 19 '20 at 15:07

1 Answers1

4

The ssh client that comes with OpenSSH does not support the syntax you quoted, where the password is provided in the command line.

If you are using a different ssh client, please let us know.

You should look into using keys for passwords-less logins, but if you really must, take a look at "sshpass" or "expect".

https://serverfault.com/questions/241588/how-to-automate-ssh-login-with-password

Shell Script for logging into a ssh server

Mau
  • 41