09-27-2007
Have you checked the error log files on both ends to see if you can find out what the problem might be? Also I would avoid the passwd in a file/script for security reasons. Even if its a jailed generic user with limited permissions its still not a good practice.
I would verify both ends have the SSH services configured correctly and that I don't have any errors in my log files while the service is running or while connecting/transferring files.
I would then check the Windows user account that I am using with the login name and verify the permissions are right. I would also check the event viewer for errors tied to that user account.
I would then get your keys working on both ends. See if you can use keys to authenticate to the UNIX host from Windows.
I would setup a scheduled task on the Windows host to sftp using key-authentication to the UNIX host and put the files before I would go the passwd in a file route.
Good luck!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am totally new to this forum so if I am asking this and it has already been asked I apologize, but I have yet to have time to figure out how to search effectively for answers in previous posts. I'll figure it out tomorrow I just wanted to get this out there in case there is someone with this... (6 Replies)
Discussion started by: New_Guru
6 Replies
2. UNIX for Dummies Questions & Answers
I am trying to write an expect script for remote server login. At some point of time I need to telnet based on the output of grep command. Based on the output I need to select the ip address of the server. How can I write an expect script for the same. The output of the grep command is as follows:... (1 Reply)
Discussion started by: ayyappakumar
1 Replies
3. Shell Programming and Scripting
When i execute rm -f $1 via a script file named rmf, it is not deleting all the files, say starting with "sec". i have execute rmf for many times to remove all the occurrences...
$rmf sec* - this should delete all files starting with sec, but not.
The rm -f sec* is working fine. kindly help... (3 Replies)
Discussion started by: frozensmilz
3 Replies
4. Shell Programming and Scripting
Dear All,
I have script that get the files from sFtp server to Unix server. The script is below.
-- Batch File (mybatch)
cd Output
get abc123.csv in/abc123.csv
get def456.csv in/def456.csv
get ghi789.csv in/ghi789.csv
bye
-- Script File
sftp -b mybatch xyz@111.222.33.4 >... (1 Reply)
Discussion started by: samrio
1 Replies
5. Shell Programming and Scripting
Hi Friends,
I need to write a script which reads the file and prints them horizontally.
For example,
the file contains something like
x1
x2
x3
x4
x5
my script reads this file as "for i in `cat filename`", but I need an output something like
"config file = x1.ccfg,... (3 Replies)
Discussion started by: dineeshkg
3 Replies
6. Shell Programming and Scripting
Hi,
I am new to Unix shell scripting.I have a requirement where I have to search for a particular file in a Unix directory based on some criterian of the content of the file.Actually there would be two files with same name and then I have zip them together and stoe in the same directory.
As... (1 Reply)
Discussion started by: Kunal Banerjee
1 Replies
7. Solaris
As I am new in UNIX , and I want to learn UNIX shell scripting.
where shall I get material for Scripting ( For basics fundamentals and production environmental scripts)
Kindly provide me ...................... (7 Replies)
Discussion started by: sunray
7 Replies
8. Shell Programming and Scripting
Hi , I need little help regarding my script.
I have a file called abc which looks below.
Rohan 12
Rakesh 23
Ajay 25
Another file looks like this (xyz).
Mumbai
Delhi
Madras
How would i add column mentioned in second file so that the file looks as below.
Rohan 12 Mumbai... (2 Replies)
Discussion started by: pinga123
2 Replies
9. Shell Programming and Scripting
Iam new to shell scripting,i have a text file in my $home directory mentioned below.
201249_BAN_EXCL.TXT
I need to refer the above file in my automated script but the number 201249 used to change every week.How can i refer to this file everyt time without renaming it manually?
Thanks in... (7 Replies)
Discussion started by: Jroyal
7 Replies
10. Shell Programming and Scripting
I have a shell script which calls a sql script.
But in the output file I'm getting an additional '^L' character.
Please advise how this is to be handled.
spool /opt/oracle/DART/out/Indx_rebuild.out
SET SERVEROUTPUT ON
SET VERIFY OFF
SET HEADING OFF
SET NEWPAGE NONE
SELECT 'ALTER INDEX '||... (2 Replies)
Discussion started by: narayanv
2 Replies
LOGIN(1) BSD General Commands Manual LOGIN(1)
NAME
login -- authenticate users and set up their session environment
SYNOPSIS
login [-Ffps] [-a address] [-h hostname] [user]
DESCRIPTION
The login utility logs users (and pseudo-users) into the computer system.
If no user is specified, or if a user is specified and authentication of the user fails, login prompts for a user name. Authentication of
users is done via passwords. If the user can be authenticated via S/Key, then the S/Key challenge is incorporated in the password prompt.
The user then has the option of entering their Kerberos or normal password or the S/Key response. Neither will be echoed.
The options are as follows:
-a The -a option specifies the address of the host from which the connection was received. It is used by various daemons such as
telnetd(8). This option may only be used by the super-user.
-F The -F option acts like the -f option, but also indicates to login that it should attempt to rewrite an existing Kerberos 5 creden-
tials cache (specified by the KRB5CCNAME environment variable) after dropping permissions to the user logging in. This flag is not
supported under pam(8).
-f The -f option is used when a user name is specified to indicate that proper authentication has already been done and that no password
need be requested. This option may only be used by the super-user or when an already logged in user is logging in as themselves.
-h The -h option specifies the host from which the connection was received. It is used by various daemons such as telnetd(8). This
option may only be used by the super-user.
-p By default, login discards any previous environment. The -p option disables this behavior.
-s Require a secure authentication mechanism like Kerberos or S/Key to be used. This flag is not supported under pam(8).
If a user other than the superuser attempts to login while the file /etc/nologin exists, login displays its contents to the user and exits.
This is used by shutdown(8) to prevent normal users from logging in when the system is about to go down.
Immediately after logging a user in, login displays the system copyright notice, the date and time the user last logged in, the message of
the day as well as other information. If the file ``.hushlogin'' exists in the user's home directory, all of these messages are suppressed.
This is to simplify logins for non-human users. login then records an entry in the wtmp(5) and utmp(5) files, executes site-specific login
commands via the ttyaction(3) facility with an action of "login", and executes the user's command interpreter.
login enters information into the environment (see environ(7)) specifying the user's home directory (HOME), command interpreter (SHELL),
search path (PATH), terminal type (TERM) and user name (both LOGNAME and USER).
The user's login experience can be customized using login class capabilities as configured in /etc/login.conf and documented in
login.conf(5).
The standard shells, csh(1) and sh(1), do not fork before executing the login utility.
FILES
/etc/login.conf login class capability database
/etc/motd message-of-the-day
/etc/nologin disallows non-superuser logins
/var/run/utmp list of current logins
/var/log/lastlog last login account records
/var/log/wtmp login account records
/var/mail/user system mailboxes
.hushlogin makes login quieter
SEE ALSO
chpass(1), newgrp(1), passwd(1), rlogin(1), skey(1), getpass(3), ttyaction(3), login.conf(5), passwd.conf(5), utmp(5), environ(7),
kerberos(8), pam(8)
HISTORY
A login appeared in Version 6 AT&T UNIX.
TRADEMARKS AND PATENTS
S/Key is a trademark of Bellcore.
BSD
November 19, 2008 BSD