Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
if i put everything in the same script it would become (nederlands: onoverzichtelijk) hard to review.
So we decided to split the testscript and mainscript apart
Click here to see the post LQ members have rated as the most helpful post in this thread.
if i do another ssh keyswap (but now i start on the remote server) and when i found a warning/error in a file, i put this in a logfile.
and then i copy this file with scp from the remote to the local server. and then i check the logfile
i did a ssh key swap again (like one in the first post of this thread) and it fails, i mean, i still need to log on everytime...
i've followed the steps he described (but then starting from the other server) and it fails...
is it because theire is already a key that it fails? or is it something else?
You don't need to copy 'from' the remote server 'to' your computer. You can just use scp reversed like this:
Code:
scp user@host:/path/to/file/filename .
will copy the file 'filename' to the location where you execute the command, using your key as set up before. No need to generate keys on the other side to obtain this.
test
scp_cd.sh 100% 111 0.1KB/s 00:00
/some/folder
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: POSSIBLE DNS SPOOFING DETECTED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The RSA host key for remotehost has changed,
and the key for the according IP address ........
is unknown. This could either mean that
DNS SPOOFING is happening or the IP address for the host
and its host key have changed at the same time.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
a9:6d:b4:05:94:15:12:62:cc:ca:5c:7b:a6:ad:53:72.
Please contact your system administrator.
Add correct host key in /some/folder/.ssh/known_hosts to get rid of this message.
Offending key in /some/folder/.ssh/known_hosts:22
RSA host key for remotehost has changed and you have requested strict checking.
Host key verification failed.
einde
why do i get that big warning at the end? is it because of:
Quote:
Offending key in /some/folder/.ssh/known_hosts:22
Last edited by brownie_cookie; 03-28-2011 at 07:45 AM.
Delete line 22 in /home/youruser/.ssh/known_hosts and try again. Also, you said you've split the script in two to keep it under control (overzichtelijk), but you might loose control if you execute a script on the other side. If it fails and terminates the connection for example because of a command inside it, you'll loose your connection without viewing any error messages. On the other hand if you use everything from your side in one script, you'll know which command is the culprit since you get all output directly to your console. If you want some more clarification, feel free to contact me off line (sending me a PM or mail).
for instance,
i've got a script that logs me on to the remote server, then i do some commands (automatically) on the remote side but after those commands i have to execute some commands on the local host, how do i terminate the connection with the remote server so i can do those commands on the local server (automatically) ??
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.