Are You Sure You Want to Continue Connecting Yes no Scp

  1. SSH: Asking "Are you sure you want to continue connecting (yes/no)?" Every Time?

    Is there a way, after running the ssh XXX.XXX.XXX.XXX command to ask "Are you sure you want to continue connecting (yes/no)?" every time that it is ran?

    Acer Aspire 3680, Intel Celeron M, 1.41 GB RAM
    Feel free to message me if you have any questions.


  2. Re: SSH: Asking "Are you sure you want to continue connecting (yes/no)?" Every Time?

    That particular ssh question should only be asked once. If you acknowledge the question with a "yes", then an entry is placed within your ~/.ssh/known_hosts file.

    Make sure that your ~/.ssh directory has the following permission mode set: 700.

    Then make sure that your ~/.ssh/known_hosts has the following permission mode: 600

    Code:

    chmod 600 ~/.ssh/known_hosts
    If you have entries within your ~/.ssh/known_hosts that conflict with an entry you are trying to add, then remove the offending entry.

    P.S. If you do not have a ~/.ssh directory, then create it before make the chmod changes noted above.

    Last edited by dwhitney67; July 23rd, 2011 at 05:57 PM.

  3. Re: SSH: Asking "Are you sure you want to continue connecting (yes/no)?" Every Time?

    Quote Originally Posted by dwhitney67 View Post

    That particular ssh question should only be asked once. If you acknowledge the question with a "yes", then an entry is placed within your ~/.ssh/known_hosts file.

    Make sure that your ~/.ssh directory has the following permission mode set: 700.

    Then make sure that your ~/.ssh/known_hosts has the following permission mode: 600

    Code:

    chmod 600 ~/.ssh/known_hosts

    If you have entries within your ~/.ssh/known_hosts that conflict with an entry you are trying to add, then remove the offending entry.

    P.S. If you do not have a ~/.ssh directory, then create it before make the chmod changes noted above.

    Thanks, but I still have some problems.

    See, I have a script that connects with ssh. If the user has never connected to that host before they will be prompted. If they have, however, they won't be. I am using an expect script to answer the questions, and I can't find a way to account for both situations without simply asking every time.

    Acer Aspire 3680, Intel Celeron M, 1.41 GB RAM
    Feel free to message me if you have any questions.


  4. Re: SSH: Asking "Are you sure you want to continue connecting (yes/no)?" Every Time?

    You can disable strict checking of host keys. With this setting, ssh will connect even if the host key is not found in the known_hosts file.

    You can do it on the command line this way:

    Code:

    ssh -o "StrictHostKeyChecking no" XXX.XXX.XXX.XXX
    Or you can update your ~/.ssh/config to include this setting.

    For more information:

    Code:

    man ssh_config | less -p StrictHostKeyChecking

  5. Re: SSH: Asking "Are you sure you want to continue connecting (yes/no)?" Every Time?

    Quote Originally Posted by stylishpants View Post

    You can disable strict checking of host keys. With this setting, ssh will connect even if the host key is not found in the known_hosts file.

    You can do it on the command line this way:

    Code:

    ssh -o "StrictHostKeyChecking no" XXX.XXX.XXX.XXX

    Or you can update your ~/.ssh/config to include this setting.

    For more information:

    Code:

    man ssh_config | less -p StrictHostKeyChecking
    at one point I had an expect script to roll through 90 servers via ssh, the quoted post is the method I used. I have come to memorize that option.

    I am infallible, you should know that by now.
    "My favorite language is call STAR. It's extremely concise. It has exactly one verb '*', which does exactly what I want at the moment." --Larry Wall
    (02:15:31 PM) ***TimToady and snake oil go way back...

    42 lines of Perl

    -

    SHI

    -

    Home Site

  6. Re: SSH: Asking "Are you sure you want to continue connecting (yes/no)?" Every Time?

    Is there a way, after running the ssh XXX.XXX.XXX.XXX command to ask "Are you sure you want to continue connecting (yes/no)?" every time that it is ran?

    there are three ways to ensure that you are asked the permissions every time...

    1. permissions as noted above, although i would have gone with 400 on the known hosts, so no-one can write to the file? rather than 600?

    2. a wrapper script to remove the line from the known_hosts

    3. a wrapper script to replace ssh command (update-alternatives, mv ssh, call ssh from new script), new script can have custom read from user...


williamsonflar1956.blogspot.com

Source: https://ubuntuforums.org/showthread.php?t=1810660

0 Response to "Are You Sure You Want to Continue Connecting Yes no Scp"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel