|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Paswordless SFTP on Unix
Hi
I know there are various threads about sftp on here but none seem to answer my question. I have set up passwordless sftp between using public and private keys. I got it to work ok between 2 Windows servers and when sending files from a windows server(client) to a Unix server. However, when I try it between 2 Unix servers it keeps asking me for the passord for the server (it also does this when I trysending from Unix (client) to a windows server. It would appear that its something to do with the Unix side being the client trying to connect......Anybody got any ideas.......?? Cheers PS.. It creates the known_hosts file ok on the client .ssh directory but stiil asks for a password..also.....its Solaris.. Last edited by billy_mega; 02-05-2008 at 10:15 AM.. Reason: Added extra information. |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
Paswordless SFTP on Unix
Hi
I know there are various threads about sftp on here but none seem to answer my question. I have set up passwordless sftp between using public and private keys. I got it to work ok between 2 Windows servers and when sending files from a windows server(client) to a Unix server. However, when I try it between 2 Unix servers it keeps asking me for the passord for the server (it also does this when I trysending from Unix (client) to a windows server. It would appear that its something to do with the Unix side being the client trying to connect......Anybody got any ideas.......?? Cheers |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
When you install the public key of ServerA to ServerB, you can only connect from ServerA to ServerB. In order to connect from ServerB to ServerA, you need to install the public key of ServerB to ServerA.
Send me the output of sftp with "-v" option. Quote:
|
|
#4
|
|||
|
|||
|
Thanks for reply.
I have just tried witha new pair of keys. Keys generated on ServerA, the public key is on serverB and Im trying to connect from ServerA (Solaris) to ServerB (Windows). Again I get it asking for a password. Following is all the output from "sftp -v": $ sftp -v tibco@ukhlsnomis1 Connecting to ukhlsnomis1... Sun_SSH_1.1, SSH protocols 1.5/2.0, OpenSSL 0x0090704f debug1: Reading configuration data /etc/ssh/ssh_config debug1: Rhosts Authentication disabled, originating port will not be trusted. debug1: ssh_connect: needpriv 0 debug1: Connecting to ukhlsnomis1 [10.96.130.6] port 22. debug1: Connection established. debug1: identity file /u01/app/tibco/.ssh/id_rsa type 1 debug1: identity file /u01/app/tibco/.ssh/id_dsa type -1 debug1: Remote protocol version 2.0, remote software version OpenSSH_3.8.1p1 debug1: match: OpenSSH_3.8.1p1 pat OpenSSH_3.6*,OpenSSH_3.7*,OpenSSH_3.8* debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-Sun_SSH_1.1 debug1: Failed to acquire GSS-API credentials for any mechanisms (No credentials were supplied, or the credentials were unavailable or inaccessible Unknown code 0 ) debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-ctr hmac-md5 none debug1: kex: client->server aes128-ctr hmac-md5 none debug1: Peer sent proposed langtags, ctos: debug1: Peer sent proposed langtags, stoc: debug1: We proposed langtags, ctos: en-GB debug1: We proposed langtags, stoc: en-GB debug1: SSH2_MSG_KEX_DH_GEX_REQUEST sent debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP debug1: dh_gen_key: priv key bits set: 138/256 debug1: bits set: 1039/2048 debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY The authenticity of host 'ukhlsnomis1 (10.96.130.6)' can't be established. RSA key fingerprint is dd:1e:09:d2:b0:a8:31:39:bb:60:ae:40:b3:f3:ec:7f. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ukhlsnomis1,10.96.130.6' (RSA) to the list of known hosts. debug1: bits set: 1010/2048 debug1: ssh_rsa_verify: signature correct debug1: newkeys: mode 1 debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: newkeys: mode 0 debug1: SSH2_MSG_NEWKEYS received debug1: done: ssh_kex2. debug1: send SSH2_MSG_SERVICE_REQUEST debug1: got SSH2_MSG_SERVICE_ACCEPT ****USAGE WARNING**** This is a private computer system. This computer system, including all related equipment, networks, and network devices (specifically including Internet access) are provided only for authorized use. This computer system may be monitored for all lawful purposes, including to ensure that its use is authorized, for management of the system, to facilitate protection against unauthorized access, and to verify security procedures, survivability, and operational security. Monitoring includes active attacks by authorized entities to test or verify the security of this system. During monitoring, information may be examined, recorded, copied and used for authorized purposes. All information, including personal information, placed or sent over this system may be monitored. Use of this computer system, authorized or unauthorized, constitutes consent to monitoring of this system. Unauthorized use may subject you to criminal prosecution. Evidence of unauthorized use collected during monitoring may be used for administrative, criminal, or other adverse action. Use of this system constitutes consent to monitoring for these purposes. debug1: Authentications that can continue: publickey,password,keyboard-interactive debug1: Next authentication method: publickey debug1: Trying public key: /u01/app/tibco/.ssh/id_rsa debug1: Authentications that can continue: publickey,password,keyboard-interactive debug1: Trying private key: /u01/app/tibco/.ssh/id_dsa debug1: Next authentication method: keyboard-interactive debug1: Authentications that can continue: publickey,password,keyboard-interactive debug1: Next authentication method: password tibco@ukhlsnomis1's password: debug1: Authentication succeeded (password) debug1: fd 6 setting O_NONBLOCK debug1: channel 0: new [client-session] debug1: send channel open 0 debug1: Entering interactive session. debug1: ssh_session2_setup: id 0 debug1: channel request 0: env debug1: channel request 0: env debug1: channel request 0: env debug1: channel request 0: env debug1: channel request 0: env debug1: Sending subsystem: sftp debug1: channel request 0: subsystem debug1: channel 0: open confirm rwindow 0 rmax 32768 sftp> bye debug1: channel 0: read<=0 rfd 6 len 0 debug1: channel 0: read failed debug1: channel 0: close_read debug1: channel 0: input open -> drain debug1: channel 0: ibuf empty debug1: channel 0: send eof debug1: channel 0: input drain -> closed debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 debug1: channel 0: rcvd eof debug1: channel 0: output open -> drain debug1: channel 0: obuf empty debug1: channel 0: close_write debug1: channel 0: output drain -> closed debug1: channel 0: rcvd close debug1: channel 0: almost dead debug1: channel 0: gc: notify user debug1: channel 0: gc: user detached debug1: channel 0: send close debug1: channel 0: is dead debug1: channel 0: garbage collecting debug1: channel_free: channel 0: client-session, nchannels 1 debug1: fd 0 clearing O_NONBLOCK debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 5.2 seconds debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0 debug1: Exit status 0 $ Cheers |
| Sponsored Links | |
|
|
#5
|
|||
|
|||
|
You might not have installed the public key properly.
Check the following link to understand better |
| Sponsored Links | |
|
|
#6
|
|||
|
|||
|
I had a similar problem today, but I was trying to do password less ssh connections between two unix servers.
The problem that I had was my .ssh folder. It didn't have the right permissions. After a chmod 700 /.ssh/ everything worked correctly. I don't know if Windows could have a similar problem. |
| Sponsored Links | |
|
|
#7
|
|||
|
|||
|
That's True. Only the user should have the write permission for ".ssh" directory.
|
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SFTP in UNIX | morbid_angel | Shell Programming and Scripting | 2 | 05-23-2011 07:01 AM |
| SFTP on SCO Unix | Arun.Kakarla | Linux | 2 | 10-22-2010 08:58 AM |
| SFTP VMS to UNIX | randyhouse | UNIX for Dummies Questions & Answers | 0 | 09-18-2009 04:24 PM |
| SFTP vs FTP and going UNIX to LINUX | TimBurke | Shell Programming and Scripting | 4 | 03-03-2007 08:23 AM |
| sftp from unix to NT | anthonykomma | HP-UX | 1 | 09-08-2006 01:00 PM |
|
|