How can I make ssh ignore .ssh/config?

spuder

I have the following in my ~/.ssh/config.

HOST 10.2.192.*
        USER foo
        PreferredAuthentications publickey
        IdentityFile ~/.ssh/foo/id_rsa

The above configuration lets me connect to a machine while typing half as many words.

 ssh 10.2.192.x

Before my ssh config, I had to type in all of this:

 ssh [email protected] -i ~/.ss/foo/id_rsa

However there is one machine in the 10.2.192.x subnet that I want to connect to with password based authentication instead of keybased authentication.

Because ssh looks at my config file and finds a match for PreferredAuthentications publickey I am unable to login with just my password.

I don't intend to ssh into this special snowflake vm often enough to warrant adding a new rule to my ssh config.

How can I make ssh ignore my config file just this once, and allow me to authenticate with a password?

DopeGhoti

To make your ssh client ignore your configuration file, use ssh -F /dev/null [email protected]. Because your subnet's IdentityFile is in ~/.ssh/foo rather than ~/.ssh/, you don't need to whip up a whole new file to eschew your extant private key.

From the ssh man page:

 -F configfile
     Specifies an alternative per-user configuration file.  If a
     configuration file is given on the command line, the system-wide
     configuration file (/etc/ssh/ssh_config) will be ignored. The default 
     for the per-user configuration file is ~/.ssh/config.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How can I make ssh ignore .ssh/config?

From Dev

How can I make IBus not ignore ~/.XCompose?

From Dev

How can I make IBus not ignore ~/.XCompose?

From Dev

How can I make MATLAB to ignore a function?

From Dev

How Can I Make Git Ignore Rails Assets?

From Dev

How can I make gitweb ignore whitespace changes?

From Dev

How can I make PHPUnit ignore a file pattern?

From Dev

How can I make NetworkManager ignore my wireless card?

From Dev

How can I make ignore path with slash in PHP?

From Dev

How can I make sed delete a line then ignore the test of the file?

From Dev

Can I ignore errors in my ssh config?

From Dev

How can I make my custom shell work with ssh?

From Dev

How can I make a user able to log in with ssh keys but not with a password?

From Dev

How can I make fonts work correctly with ssh -X?

From Dev

How can I make my custom shell work with ssh?

From Dev

Can I tell Make to ignore environment variables?

From Dev

Can I make davfs ignore untrusted certificates?

From Dev

How can I force SSH to ignore the IdentityFile listed in "Host *" for one specific host?

From Dev

How can I make echo or printf in shell ignore a double backslash (\\) and print it as I see it

From Dev

How can I make boost program options ignore certain inputs to be processed by another interpreter?

From Dev

How can I make Mockito.verify ignore other type parameters?

From Dev

XmlArray Serialization - How can I make the serializer ignore the class name of items in a list?

From Dev

Jackson with JSON: How can I make it ignore additional properties but error on incomplete json?

From Dev

How can I make a constructor that contains a number of the same objects but if one its empty to ignore it?

From Dev

How can I make a bot ignore case while only responding to a sentence if it contains a certain word or phrase?

From Dev

How can I make this only match the words after the word 'speaks' and ignore commas and spaces

From Dev

How can I make 'diff -X' ignore specific paths and not file names?

From Dev

How can I make Windows Media Player ignore global hotkeys in Windows 7?

From Dev

How can I make Excel ignore special characters and spaces when taking data from another cell?

Related Related

  1. 1

    How can I make ssh ignore .ssh/config?

  2. 2

    How can I make IBus not ignore ~/.XCompose?

  3. 3

    How can I make IBus not ignore ~/.XCompose?

  4. 4

    How can I make MATLAB to ignore a function?

  5. 5

    How Can I Make Git Ignore Rails Assets?

  6. 6

    How can I make gitweb ignore whitespace changes?

  7. 7

    How can I make PHPUnit ignore a file pattern?

  8. 8

    How can I make NetworkManager ignore my wireless card?

  9. 9

    How can I make ignore path with slash in PHP?

  10. 10

    How can I make sed delete a line then ignore the test of the file?

  11. 11

    Can I ignore errors in my ssh config?

  12. 12

    How can I make my custom shell work with ssh?

  13. 13

    How can I make a user able to log in with ssh keys but not with a password?

  14. 14

    How can I make fonts work correctly with ssh -X?

  15. 15

    How can I make my custom shell work with ssh?

  16. 16

    Can I tell Make to ignore environment variables?

  17. 17

    Can I make davfs ignore untrusted certificates?

  18. 18

    How can I force SSH to ignore the IdentityFile listed in "Host *" for one specific host?

  19. 19

    How can I make echo or printf in shell ignore a double backslash (\\) and print it as I see it

  20. 20

    How can I make boost program options ignore certain inputs to be processed by another interpreter?

  21. 21

    How can I make Mockito.verify ignore other type parameters?

  22. 22

    XmlArray Serialization - How can I make the serializer ignore the class name of items in a list?

  23. 23

    Jackson with JSON: How can I make it ignore additional properties but error on incomplete json?

  24. 24

    How can I make a constructor that contains a number of the same objects but if one its empty to ignore it?

  25. 25

    How can I make a bot ignore case while only responding to a sentence if it contains a certain word or phrase?

  26. 26

    How can I make this only match the words after the word 'speaks' and ignore commas and spaces

  27. 27

    How can I make 'diff -X' ignore specific paths and not file names?

  28. 28

    How can I make Windows Media Player ignore global hotkeys in Windows 7?

  29. 29

    How can I make Excel ignore special characters and spaces when taking data from another cell?

HotTag

Archive