Are You Sure You Want to Continue Connecting Yes no Scp
-
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.
-
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
If you have entries within your ~/.ssh/known_hosts that conflict with an entry you are trying to add, then remove the offending entry.Code:
chmod 600 ~/.ssh/known_hosts
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.
-
Re: SSH: Asking "Are you sure you want to continue connecting (yes/no)?" Every Time?
Thanks, but I still have some problems.
Originally Posted by dwhitney67
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.
-
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:
Or you can update your ~/.ssh/config to include this setting.Code:
ssh -o "StrictHostKeyChecking no" XXX.XXX.XXX.XXX
For more information:
Code:
man ssh_config | less -p StrictHostKeyChecking
-
Re: SSH: Asking "Are you sure you want to continue connecting (yes/no)?" Every Time?
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.
Originally Posted by stylishpants
I am infallible, you should know that by now.
42 lines of Perl
"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...-
SHI-
Home Site
-
Re: SSH: Asking "Are you sure you want to continue connecting (yes/no)?" Every Time?
there are three ways to ensure that you are asked the permissions 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?
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