SFTP silent login


 
Thread Tools Search this Thread
Operating Systems HP-UX SFTP silent login
# 1  
Old 11-07-2005
SFTP silent login

Hi,

I am connecting via SFTP to a remote Server. My problem is on trying to LOGin, I am asked for a password. I need to make this process automatic such that I can login without being prompted for a password.

I can achieve this if the remote server has a simple FTP server and not SFTP. How can I achieve this for SFTP ???

I have heard about some solution using KERBEROS but it appears way too complicated and even our System and Network Admins dont have any idea on how to use it..

Appreciate any suggestions,

TIA,
sg
# 2  
Old 11-08-2005
You can use key-based authentication to login without using a password. You can do this very easily. Search for "ssh key based authentication" or something similar on google.
# 3  
Old 11-08-2005
ssh config

Hi,

Thanks for the info. Our client unix machine has OpenSSH running on it. Using the tool ssh-keygen, I did generate a public and private key, inserted the Public key in the remote machine $home/.ssh dir but still I am being asked for a password.

I have a doubt here and appreciate any clarification:

I have been provided with an user and password to login via SFTP to the remote machine. How do I tie this user and password to the Public/ Private Keys generated in the client machine ????
If I dont tie them together, how does the remote machine permit access to it !!?

Thnx,
Sands
# 4  
Old 11-08-2005
Quote:
Originally Posted by sgaucho
Hi,

Thanks for the info. Our client unix machine has OpenSSH running on it. Using the tool ssh-keygen, I did generate a public and private key, inserted the Public key in the remote machine $home/.ssh dir but still I am being asked for a password.

I have a doubt here and appreciate any clarification:

I have been provided with an user and password to login via SFTP to the remote machine. How do I tie this user and password to the Public/ Private Keys generated in the client machine ????
If I dont tie them together, how does the remote machine permit access to it !!?

Thnx,
Sands
You don't need the username and password in that case. The server allows you to log in through another authentication mechanism(public key).

When you copied the public key to the destination server, did you put it in the file ~/.ssh/authorized_keys? Whats the permissions of the file? Of the .ssh directory?
# 5  
Old 11-09-2005
The permissions on your .ssh directory and the files below that should be like these:
# ls -ld .ssh
drwx------ 2 xxxx xxxx 96 xxxxx .ssh

# cd .ssh
# ls -l
total 64
-rw------- 1 xxxx xxxx 887 xxxxx id_rsa
-rw------- 1 xxxx xxxx 1024 xxxxx prng_seed

As you can see, only the owner should have read/write permissions on the directory and the files. In fact, ssh wont work if you are more permissive than this.
# 6  
Old 11-09-2005
ssh config

hi guys, thanks for the info. I have another doubt now !

Whats with this authorized_keys file ?? is it a file or a directory under .ssh ??

I dumped the public key generated by my client into the .ssh dir of the remote server.

Please clarify something, authorized_keys is generated by whom and how do I insert the Public key into this file ? do a simple cat id_rsa.pub > authorized_keys ??

thnx a lot,
sg
# 7  
Old 11-09-2005
Exactly, just cat into the authorized_keys file.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Change login password for SFTP Only ID

Hi All, I have an SFTP server where there are user id's created for vendors and given only SFTP access for them (eg: given below) jim.tran:x:10040:10008:abc.def@ghi.com:/dropbox:/bin/false They cannot login to the server via SSH and can only do an SFTP. These users are set up as jailed... (1 Reply)
Discussion started by: nathsaba
1 Replies

2. Shell Programming and Scripting

Password less login for sftp

Hi, I am using public key authentication for login into a remote sftp server (password less login). so i have set up a password less login according to this link . i have copied the content of my .pub file to remote server's authorized_keys2 file. i want to find out whether my .pub file... (2 Replies)
Discussion started by: Little
2 Replies

3. Shell Programming and Scripting

Login getting locked on sftp

Hey All, I have a ascript which sftp files from Solaris to Windows. I am usgin expect and sending password though script. I have observed that sometimes script works fine (manually or in cron) but after some run, the user I am usgin to connect is getting locked on Domain level. I am... (6 Replies)
Discussion started by: Deei
6 Replies

4. Shell Programming and Scripting

Need Help on SFTP login from another server

Hi Experts, I am writing one shell script. Below is the requirement 1. need to login to the SFTP server, go to the particular folder 2. take the file count in that folder and assign it to variable 3. came out of the SFTP server and check the condition, if the file count is less than the... (1 Reply)
Discussion started by: bbc17484
1 Replies

5. UNIX for Advanced & Expert Users

secure sftp login not working in RedHat Linux

I'm using RedHat Linux 6.1 and wanted to create an user account with only access to single directory. Have followed all the steps from below link and still user is not able to login: How to Setup Chroot SFTP in Linux (Allow Only SFTP, not SSH) (link removed) While the other users, which... (10 Replies)
Discussion started by: asyed
10 Replies

6. Red Hat

Chroot sftp users, remote sftp login shows wrong timestamp on files

Hello, I have a weird issue, I have RHEL 5.7 running with openssh5.2 where sftpgroup OS group is chroot. I see the difference difference in timestamp on files, when I login via ssh and SFTP, I see four hour difference, is something missing in my configuration. #pwd... (8 Replies)
Discussion started by: bobby320
8 Replies

7. UNIX for Advanced & Expert Users

Login through SFTP using username and password

Hi All, I want to login to a server through SFTP by giving username and password, in an automated script. I know that this can be done through public key authentication, but my requirement is to login ONLY through username and password. I am using GNU/Linux server. Please advise me !!!... (4 Replies)
Discussion started by: sparks
4 Replies

8. UNIX for Dummies Questions & Answers

Only root can login using SFTP

Hello, It seems on a machine that I am responsible for supervising only root can use ssh/sftp services. I have looked at sshd_config and do not see anything that can fix this. PermitRootLoggin is enabled but that option does not preclude other users from using ssh/sftp services. When I try and... (5 Replies)
Discussion started by: mojoman
5 Replies

9. Shell Programming and Scripting

sftp auto login

Hi, I looked into lot of posts on this question but i could not figure out the solution. we are using the following ftp shell program to send the file to target server. #!/usr/bin/ksh ftp -n -i<<EOF 2>&1 open <target server ip> user <username> <pwd> lcd /sc/doc/prd/FCSTP put file1.txt... (3 Replies)
Discussion started by: srrao.ch
3 Replies

10. Solaris

Auto login with SFTP

Hi All, How do you get around SFTP not having the 'cat' command to set up scripts to run cron jobs for passwords? I am use to the FTP allowing that, but we are converting to SFTP and need to be able to still run the same scripts in off hrs. Is there a way to still cat the password at the prompt... (14 Replies)
Discussion started by: wsiefkas
14 Replies
Login or Register to Ask a Question