11-28-2008
Have you already setup SSH for the respective user on each machine?
If not, log int each machine and run this command: ssh-keygen
(Do man ssh-keygen for more information.) It will create keys in ~/.ssh.
I find the simplest thing to do at this point is to copy the .pub files to some easily-accessible common location (secrecy is not needed for the .pub files, so it could be a publicly available site) such as a shared drive or ftp server (or a USB key) and then fetch them onto the opposite machines and append them to .ssh/authorized_keys.
That is, on machine A, copy ~/.ssh/id_dsa.pub somewhere as A_id_dsa.pub. And on machine B, copy ~/.ssh/id_dsa.pub as B_id_dsa.pub.
Then on machine A do this:
cat B_id_dsa.pub >> ~/.ssh/authorized_keys
And on machine B do this:
cat A_id_dsa.pub >> ~/.ssh/authorized_keys
You could do the same for the other .pub files, but I never bother with them.
At that point, you should be able to use scp.
If it still fails, you can try renaming or even deleting ~.ssh/known_hosts on each machine. Information is stored it it when you make contact the first time and that may inhibit future connections if anything changes (like a dynamic IP address).
You can also experiment with ~/.ssh/config (see man ssh_config).
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I would like to write shell script to transfer some ASCII files from HPUX server to Linux server or vice-versa. What options I have for file transfer Methods.
1) FTP
2) rcp
3) HTTP
4)Whatelse? (2 Replies)
Discussion started by: Teh Tiack Ein
2 Replies
2. Shell Programming and Scripting
hi all
how do i copy a file from one server to another
thanks
bkan77 (4 Replies)
Discussion started by: bkan77
4 Replies
3. UNIX for Dummies Questions & Answers
Dear all,
Can anybody let me know how to automate a file transfer process to a remote m/c thru SFTP , automate means it will not prmpt for password.
how i am going to achive this....and what all methods are available or tools are available ???? (2 Replies)
Discussion started by: manas_ranjan
2 Replies
4. Programming
HI
Can anyone provide me with codes for file transfer server to client or vice versa?
Also please explain how to compile those programs in ubuntu terminal as i am totally new to socket programming.
Thanks (0 Replies)
Discussion started by: mayhemtrigger
0 Replies
5. Shell Programming and Scripting
Hi All
I have two PC connected with each other via LAN cable.
In one of the PC the Perl is installed. What I want to do is transfer the data from one PC to another via Perl.
Is it possible to do this.
---------- Post updated at 11:31 PM ---------- Previous update was at 07:01 AM ----------... (10 Replies)
Discussion started by: parthmittal2007
10 Replies
6. UNIX for Advanced & Expert Users
I have 3 AIX server namely - Server 1 , Server 2 and Server 3.
And have done SCP setup between Server 1 and Server 2 so that i dont have to give password when i transfer file from Server 1 to Server 2 by setting public key between the server.
Q1. If the unix password of the target server... (3 Replies)
Discussion started by: Pash
3 Replies
7. Shell Programming and Scripting
Hi,
I have written a small script to transfer a file from one unix server to other using scp command which is working fine. As I know with scp, if any file with the same name is already present on destination server, it would get overwritten without any notification to user. Could anyone help me... (14 Replies)
Discussion started by: dsa
14 Replies
8. UNIX for Advanced & Expert Users
On unix AIX server, when I am trying to transfer file from one directory to another directory on the same server through a program(where i call the script) it gives error "Lost Connection". (5 Replies)
Discussion started by: Pash
5 Replies
9. Shell Programming and Scripting
Hi,
I need a shell script to transfer a file from one server(unix box) to another server(windows box).
I have the details of the source and destination Ip's.
source path : /home/UNIX/server
filename:abc.txt
Destination folder: D:/UNIX/test
I am using AIX server.
Type of shell :... (1 Reply)
Discussion started by: NareshN
1 Replies
10. UNIX for Advanced & Expert Users
When using FTP to transfer a file from IBM iSeries family of servers client to a non IBM Iseries family server, files might have characters appear in the wrong format
Eg | in Iseries and while transferring fro Iseries system to Linux , but instead of | it is showing as ?.
Please advise (3 Replies)
Discussion started by: sudhainit
3 Replies
LEARN ABOUT CENTOS
ssh-keysign
SSH-KEYSIGN(8) BSD System Manager's Manual SSH-KEYSIGN(8)
NAME
ssh-keysign -- ssh helper program for host-based authentication
SYNOPSIS
ssh-keysign
DESCRIPTION
ssh-keysign is used by ssh(1) to access the local host keys and generate the digital signature required during host-based authentication with
SSH protocol version 2.
ssh-keysign is disabled by default and can only be enabled in the global client configuration file /etc/ssh/ssh_config by setting
EnableSSHKeysign to ``yes''.
ssh-keysign is not intended to be invoked by the user, but from ssh(1). See ssh(1) and sshd(8) for more information about host-based authen-
tication.
FILES
/etc/ssh/ssh_config
Controls whether ssh-keysign is enabled.
/etc/ssh/ssh_host_dsa_key
/etc/ssh/ssh_host_ecdsa_key
/etc/ssh/ssh_host_rsa_key
These files contain the private parts of the host keys used to generate the digital signature. They should be owned by root, read-
able only by root, and not accessible to others. Since they are readable only by root, ssh-keysign must be set-uid root if host-
based authentication is used.
/etc/ssh/ssh_host_dsa_key-cert.pub
/etc/ssh/ssh_host_ecdsa_key-cert.pub
/etc/ssh/ssh_host_rsa_key-cert.pub
If these files exist they are assumed to contain public certificate information corresponding with the private keys above.
ENVIRONMENT
SSH_USE_STRONG_RNG
The reseeding of the OpenSSL random generator is usually done from /dev/urandom. If the SSH_USE_STRONG_RNG environment variable is
set to value other than 0 the OpenSSL random generator is reseeded from /dev/random. The number of bytes read is defined by the
SSH_USE_STRONG_RNG value. Minimum is 14 bytes. This setting is not recommended on the computers without the hardware random genera-
tor because insufficient entropy causes the connection to be blocked until enough entropy is available.
SEE ALSO
ssh(1), ssh-keygen(1), ssh_config(5), sshd(8)
HISTORY
ssh-keysign first appeared in OpenBSD 3.2.
AUTHORS
Markus Friedl <markus@openbsd.org>
BSD
July 16, 2013 BSD