ssh2 & sftp help


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers ssh2 & sftp help
# 1  
Old 06-21-2006
ssh2 & sftp help

Hi,

I need to implement sftp between server 1 and server2.

I have already generated the public key using account user1 on server 1 and and sent it to the administrator of server2.

I have also finished updating the identification file at /home/user1/.ssh2

I have an account created user2 which I should use when connecting to server2. However, when I am using the following command to connect to server2, I get the messages below:

>ssh -v user2@server2
debug: Connecting to user2@server2, port 22... (SOCKS not used)
warning: Connecting to user2@server2 failed: No address associated to the name


Any clues what I should do from here, please.

Thanks
# 2  
Old 06-21-2006
Hi.
If you want to connect from server1 (user1) to server2 (user2), you have to create the keys for user1 in server1 (ssh-keygen -t rsa/dsa), then get the public key and copy it to /home/user2/.ssh/authorized_keys
Set the appropiate perms for the files and check that both machies are resolving their IP/names.
By default, usually, sshd have cert auth activated so you should not have any problem.
Regards.
# 3  
Old 06-21-2006
Thanks for your response Grial.

As you suggested
(i) get the public key and copy it to /home/user2/.ssh/authorized_keys was already done

(ii) Set the appropiate perms for the files - what should the perms be, please (700) ??

(iii) and check that both machies are resolving their IP/names.
# 4  
Old 06-21-2006
I suppose that still don't work Smilie

Quote:
Originally Posted by tansha
(i) get the public key and copy it to /home/user2/.ssh/authorized_keys was already done
OK, check that this key is in one line and exactly as in user1@server1
Quote:
(ii) Set the appropiate perms for the files - what should the perms be, please (700) ??
600 should be OK.
Quote:
(iii) and check that both machies are resolving their IP/names.
So "ping server2" from server1 should ping to server2 IP and "ping server1" from server2 should ping to serer1 IP, right?
Now, chek your server2:/etc/ssh/sshd_config and look for these lines:
Code:
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile     %h/.ssh/authorized_keys

Good luck! Smilie
# 5  
Old 06-21-2006
Hi ,

Managed to solve the problem. Actually the servername I am trying to connect had no entry in the /etc/hosts file.

Working fine now

Thanks again for your help.
# 6  
Old 06-22-2006
Hi,

I am expeiencing the following problem with sftp. I am using this for the first time to get some files from server 1 to server2. The connection to the remote host is OK. But when I try to get a file, I get the following message:

Disconnected; protocol error (Protocol error: packet too long: 56548.).
Warning: child process (/usr/bin/ssh2) exited with code 66.

Any suggestions, please

Thanks
# 7  
Old 06-22-2006
As the error says, seems to be aprotocol error. Check againd your servers' sshd_config, and look for this line:
Code:
Protocol 2,1

Then connect forcing the protocol with either:
Code:
ssh -1 ...

or
Code:
ssh -2 ...

Check wether both server and client are using the same protocol version, and that you have the needed certificates.

Regards.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

SFTP Shell Script Get & Delete && Upload & Delete

Hi All, Do you have any sample script, - auto get file from SFTP remote server and delete file in remove server after downloaded. - only download specify filename - auto upload file from local to SFTP remote server and delete local folder file after uploaded - only upload specify filename ... (3 Replies)
Discussion started by: weesiong
3 Replies

2. UNIX for Dummies Questions & Answers

SFTP connection to SSH2 UNIX server

Plz share how we can make a passwordless SSH connection from a SSH1 UNIX server to SSH2 UNIX server. (3 Replies)
Discussion started by: krishna87
3 Replies

3. Solaris

SSH & SFTP Chroot

Hello all, does anybody knows a procedure to enable an chroot for users using ssh and sftp ? Thanks (1 Reply)
Discussion started by: celord
1 Replies

4. Shell Programming and Scripting

sftp + expect: disconnection & restart removes already transfered data.

I have an ftp statement that when it restarts, it will write over the top of the file at the other end, rather than append to the file part sitting at the destination. This is a problem because the flaky connection fails so regularly that the 2GB file I try to transfer will never complete. ... (2 Replies)
Discussion started by: rupert160
2 Replies

5. Solaris

SFTP from SSH2 to SSH

Hi, Earlier, I have configured SFTP successfully in my prev jobs. This time I have to configure SFTP for local server (uses SSH2) and remote server (uses SSH). I tried to search the forum. I did not find the right thread. I appreciate your help. The following is the additional info >... (5 Replies)
Discussion started by: bobbygsk
5 Replies

6. AIX

sftp between Unix & windows

Guys, sftp between Unix & Windows I'd like to get good software or a way to how to configure sftp between ( windows to Unix ) and ( Unix to windows ) to be automatic login between the different operating systems without asking password .. Pls assist in this regard … (3 Replies)
Discussion started by: Mr.AIX
3 Replies

7. Shell Programming and Scripting

Using SSH2 in windows

I have Windows server setups consisting two servers to work on. I have to run a batch file on server 2 (say, Batch2) by running a batch file on server 1 (Say, Batch1). We have Tectia SSH server-client setup. Could anyone please tell the script/code for Batch1? (1 Reply)
Discussion started by: sakha83
1 Replies

8. Shell Programming and Scripting

File locking (Unix/Linux) & sftp

Hi all, Can anyone help ...on how to ensure that a file is locked . thanks & regards, Soodoo ---------------------------------------- Problem description: - We usually use the mv command in scripts to make sure that a file is complete and not being written to by another process. ... (1 Reply)
Discussion started by: soodoo
1 Replies

9. Shell Programming and Scripting

SFTP & Passphrase('s)

Hi all, I generally use the something along the lines of the following when I need to perform SFTP's ... sftp -v -o IdentityFile=${IdentityFile} \ -b ${SFTP_BATCH_FILE} \ ${USRID}@${IP_OR_DNS}:${REMOTE_DIR} 2>&1 | tee -a ${SFTPLOG}Now currently we are not using any passphrase... (4 Replies)
Discussion started by: Cameron
4 Replies

10. AIX

SSH2 help !!!!

Hi, I need to implement sftp between server 1 and server2. I have already generated the public key using account user1 on server 1 and and sent it to the administrator of server2. I have also finished updating the identification file at /home/user1/.ssh2 I have an account created... (2 Replies)
Discussion started by: tansha
2 Replies
Login or Register to Ask a Question