whoisearth
whoisearth

Reputation: 4170

ssh ignore special character

I'm on an RHEL server trying to SSH to a windows server using the following command -

ssh -p 5950 -i /home/svcacct/.ssh/serverkey svcacct@servername prog Alias=database add -a blah -p "var1=shared_data\Repost, var2=1771, var3=1000 - S&P Index Summary, var4=SP, var5=20150129"

It then fails with the following message -

'P' is not recognized as an internal or external command, operable program or batch file.

The reason seems to be that linux is using the '&' as a special character which I don't want it to do.

Upvotes: 0

Views: 223

Answers (1)

entropid
entropid

Reputation: 6239

It seems you forgot to escape some quotes:

ssh -p 5950 -i /home/svcacct/.ssh/serverkey svcacct@servername prog Alias=database add -a blah -p "var1=shared_data\Repost, var2=1771, var3=\"1000 - S&P Index Summary\", var4=SP, var5=20150129"

Upvotes: 1

Related Questions