0

trying to ssh from my macbook pro, to a remote server,

ssh ayan@ServerIPAddress

gives the following error

ssh: illegal option -- ?
usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface]
           [-b bind_address] [-c cipher_spec] [-D [bind_address:]port]
           [-E log_file] [-e escape_char] [-F configfile] [-I pkcs11]
           [-i identity_file] [-J [user@]host[:port]] [-L address]
           [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
           [-Q query_option] [-R address] [-S ctl_path] [-W host:port]
           [-w local_tun[:remote_tun]] destination [command [argument ...]]

I am unable to to locate the source of this error. I deleted the whole ~/.ssh/* directory and infact any argument after ssh is throwing error. If I tried ssh [email protected] i.e. without any arguments starting with - then it asks for password, but after it doesnot connect and keeps asking for the password repetatively.

4
  • Are you sure that contains the login password? Normally, the help output from ssh starts with [-46AaCfGgKkMNnqsTtVvXxYy], which is the list of single-letter options supported by the ssh command. Otherwise, that command line looks fine, unless you have an alias for the ssh command. Does the command alias ssh yield any output?
    – larsks
    Feb 11 at 16:10
  • @larsks Wow, yeah you are right, it is not my password. Except that my login password also starts with 46 and I carelessly overlooked it. Now about the problem, can you post as a separate answer ? I want to look into your suggestion more in depth. thanks
    – Ayan Mitra
    Feb 11 at 18:58
  • I don't think that "do you have an alias for the ssh command?" really counts as an answer. It would be great if you could update your question with answers to my previous comment. If alias ssh doesn't show anything, then maybe also throw in the output of type -a ssh.
    – larsks
    Feb 12 at 0:10
  • type -a ssh -> ssh is /usr/bin/ssh and alias ssh returns empty
    – Ayan Mitra
    Feb 16 at 5:51

0

You must log in to answer this question.

Browse other questions tagged .