SSH/Sftp log in fail recovery


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting SSH/Sftp log in fail recovery
# 1  
Old 01-05-2007
SSH/Sftp log in fail recovery

I am connecting to X number of boxes and using sftp to grab files that need to backed up. the box i am doing it from should have keys set up, but in case something happens and it doesnt i need my script to recover from it and not sit there waiting for a password for 10 min. And i need to log which box failed so the problem can be fixed. Is there an easy way to test connect to each box and log when the test fails?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need Help ssh key fail on remote server

Hello everyone, I need some help writing a bash script to: 1. ssh from a jumpserver to 50 remote servers logging in automatically using ssh keys and capture if zabbix is running by running a "ps -ef | grep zabbix" and output to a logfile capturing the server hostname and ps -ef output to... (2 Replies)
Discussion started by: vtowntechy
2 Replies

2. Shell Programming and Scripting

When redirecting tail -F output fail after log rotation?

Redirecting the tail output fails when log rotation happens even though i have used -F. But when i tail and see the output on terminal this does not happen. Note i have also used & to execute this statement in background. Suppose if i want to tail a file /opt/SAMPLE.txt and redirect its output... (1 Reply)
Discussion started by: CN1
1 Replies

3. Solaris

Remote Ssh Fail

Hi, I'm getting error when try to remote using ssh. I already check and ssh service is online. Does solaris 11 sparc need to do other setting. Error is interactive keyboard failed. Please assist me. Thanks. ---------- Post updated at 10:25 PM ---------- Previous update was at 08:49 PM... (0 Replies)
Discussion started by: mzainal
0 Replies

4. Shell Programming and Scripting

sftp ssh-keygen

sftp username@host <<EOF lcd /home/dirA cd /home/dirB mput *.txt exit EOF Hi, i have done the keygen-ssh settings but rite now I log through putty I enter my credentials and then when i successfully log in, then I issue the command ssh server name then I again enter into the server but... (1 Reply)
Discussion started by: rahulsxn660
1 Replies

5. Shell Programming and Scripting

SFTP-how to log individual sftp command error while executing shell script

Hi, I have situation where i need to automate transferring 10000+ files using sftp. while read line do if ; then echo "-mput /home/student/Desktop/folder/$line/* /cygdrive/e/folder/$line/">>sftpCommand.txt fi done< files.txt sftp -b sftpCommand.txt stu@192.168.2.1 The above... (1 Reply)
Discussion started by: noobrobot
1 Replies

6. Shell Programming and Scripting

Query a oracle DB when fail put in in the error log

Hi all, I'm trying to create a script that does the following: Connect with SQLplus to my oracle db. Do a select 1 from dual; and when I don't get a value back. Than put the $DATE in a logfile. What I have until now: #!/bin/bash # values GEN_ERR=1 #error 1 code USER=username... (8 Replies)
Discussion started by: Roadster
8 Replies

7. 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

8. UNIX for Dummies Questions & Answers

Locked out of ssh and sftp

I've been having troubles where i get locked out of shh and sftp. It happens overnight and when i come in the next day i have been locked out and can't seem to log in to the server through ssh or sftp. It is a co location server and each day i am having to have the hosts restart my server. When... (2 Replies)
Discussion started by: timgolding
2 Replies

9. Shell Programming and Scripting

SSH and SFTP

remotePath=$1 fileName=$2 remoteUser=$3 remoteServer=$4 echo " if ; then echo '0'; else echo '1'; fi " > temp_command.log command1=`cat temp_command.log` ssh $remoteUser@$remoteServer $command1 rm temp_command.log Above code is to check whether the file in remote server is exist. It... (1 Reply)
Discussion started by: suigion
1 Replies

10. AIX

SFTP Issue with ssh

Hello all, hopefuly this is the right place to post this. I am having an issue with a new sftp process on an AIX box. I created id_rsa.pub file and sent it to the person who runs the sftp process. He added the key to the authorized_Users (I only have phone contact with him and its an outside... (7 Replies)
Discussion started by: dbridle
7 Replies
Login or Register to Ask a Question
sftp-server(1M) 					  System Administration Commands					   sftp-server(1M)

NAME
sftp-server - SFTP server subsystem SYNOPSIS
/usr/lib/ssh/sftp-server DESCRIPTION
sftp-server implements the server side of the SSH File Transfer Protocol as defined in the IETF draft-ietf-secsh-filexfer. sftp-server is a subsystem for sshd(1M) and must not be run directly. There are no options or config settings. To enable the sftp-server subsystem for sshd add the following to /etc/ssh/sshd_config: Subsystem sftp /usr/lib/ssh/sftp-server See sshd_config(4) for a description of the format and contents of that file. There is no relationship between the protocol used by sftp-server and the FTP protocol (RFC 959) provided by in.ftpd. EXIT STATUS
The following exit values are returned: 0 Successful completion. >0 An error occurred. FILES
/usr/lib/sftp-server ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWsshdu | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
sftp(1), ssh(1), ssh-add(1), ssh-keygen(1), sshd(1M), sshd_config(4), attributes(5) To view license terms, attribution, and copyright for OpenSSH, the default path is /var/sadm/pkg/SUNWsshdr/install/copyright. If the Solaris operating environment has been installed anywhere other than the default, modify the given path to access the file at the installed location. AUTHOR
Markus Friedl SunOS 5.10 30 Jul 2003 sftp-server(1M)