- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- SFTP without applying password in script
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2009 10:50 AM
тАО03-12-2009 10:50 AM
SFTP without applying password in script
How to create sftp?
How to automate in script for sftp without password?
If i create script to pull the file means its asking password.
I have installed HPUX secure shell in both servers.
T1471AA A.05.10.006 HP-UX Secure Shell
Please help and suggest me how to proceed further.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2009 10:52 AM
тАО03-12-2009 10:52 AM
Re: SFTP without applying password in script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2009 11:06 AM
тАО03-12-2009 11:06 AM
Re: SFTP without applying password in script
Please find the below output:
ssh01# sftp client01
Connecting to client01...
ssh: connect to host client01 port 22: Connection timed out
Connection closed
and
but when i connect in client server to ssh server it got connected.
client01# sftp ssh01
Connecting to ssh01...
Password:
sftp>
here ssh01 -> ssh server
client01 -> client server
please suggest me
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2009 11:14 AM
тАО03-12-2009 11:14 AM
Re: SFTP without applying password in script
It appears from the message that SSH may be installed, but the sshd daemon is not running.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2009 11:26 AM
тАО03-12-2009 11:26 AM
Re: SFTP without applying password in script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2009 12:53 PM
тАО03-12-2009 12:53 PM
Re: SFTP without applying password in script
> installed, but the sshd daemon is not
> running.
Not to me. If sshd were not running (or
configured to run), I'd expect a "Connection
refused" complaint, not "Connection timed
out". I'd look for a firewall which might be
blocking the SSH traffic in one direction.
Is SSH the only service which fails this way?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2009 04:27 AM
тАО03-13-2009 04:27 AM
Re: SFTP without applying password in script
client01# uname -a
HP-UX client01 B.11.11 U 9000/800 104424606 unlimited-user license
client01# model
9000/800/L3000-5x
client01# ps -ef| grep -i sshd
root 8019 7843 1 07:46:02 pts/0 0:00 grep -i sshd
root 16714 1 0 Mar 10 ? 0:19 /opt/ssh/sbin/sshd
ssh server:
ssh01# uname -a
HP-UX ssh01 B.11.11 U 9000/800 355204990 unlimited-user license
ssh01# model
9000/800/rp3440
ssh01# ps -ef| grep -i sshd
root 2505 1 0 13:20:32 ? 0:06 /opt/ssh/sbin/sshd
root 11791 11553 0 07:41:40 pts/0 0:00 grep -i sshd
root 11540 2505 0 07:25:28 ? 0:00 sshd: aiyadura [priv]
aiyadura 11543 11540 0 07:25:35 ? 0:00 sshd: aiyadura@pts/0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2009 04:34 AM
тАО03-13-2009 04:34 AM
Re: SFTP without applying password in script
scp /tmp/a.txt aruna@targetmachine:/tmp
if you are looking to transfer files without a password check
http://saikrishbe.wordpress.com/2007/01/19/remote-login-without-password/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2009 04:49 AM
тАО03-13-2009 04:49 AM
Re: SFTP without applying password in script
If sshd daemon is running on client01, then you should be able to sftp.
Just restart the sshd daemon on client01 and try from ssh01.
#/sbin/init.d/secsh stop
#/sbin/init.d/secsh start
After restarting sshd, try this on client01 to confirm ssh port 22 is listening
client01#telnet localhost 22
client01#ssh localhost 22
If this works then you should be able to sftp to the server.
Creating a script to pull the files without password is next task which can be easily done by configuring passwordless login.
First fix the sftp issue.
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2009 04:53 AM
тАО03-13-2009 04:53 AM
Re: SFTP without applying password in script
ssh01# scp /tmp/test client01:/tmp/
ssh: connect to host client01 port 22: Connection timed out
lost connection
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2009 04:59 AM
тАО03-13-2009 04:59 AM
Re: SFTP without applying password in script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2009 04:59 AM
тАО03-13-2009 04:59 AM
Re: SFTP without applying password in script
Is there any firewall in between ssh01 and client01? I strongly suspect there is afirewall which is blocking the connection from ssh01 to client01.
In that case you need to open the firwall port 22 for ssh01 to client01.
You check with your network team.
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2009 05:08 AM
тАО03-13-2009 05:08 AM
Re: SFTP without applying password in script
node1 and node2:
#grep -i sftp /etc/opt/ssh/sshd_config
Subsystem sftp /opt/ssh/libexec/sftp-server -f LOCAL1 -l INFO
node1#
sftp mode2<< EOF
pwd
quit
EOF
Connecting to node2...
sftp> pwd
Remote working directory: /root
sftp> quit
No password "prompt".
rgs,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2009 05:32 AM
тАО03-13-2009 05:32 AM
Re: SFTP without applying password in script
As per your information i have tried the below following.
1. restarted sshd in client01
cd /sbin/init.d/secsh stop and start
2. in ssh01 i have tried
ssh01# sftp client01
Connecting to client01...
ssh: connect to host client01 port 22: Connection timed out
Connection closed
3. in client01
client01# telnet localhost 22
Trying...
Connected to localhost.armstrong.com.
Escape character is '^]'.
SSH-1.99-OpenSSH_5.1p1+sftpfilecontrol-v1.2-hpn13v5
Connection closed by foreign host.
client01#ssh localhost 22
Password:
sh: 22: not found.
Please suggest me
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2009 05:48 AM
тАО03-13-2009 05:48 AM
Re: SFTP without applying password in script
ssh localhost
ssh localhost 22 will try to run the command 22. But being that it returned the error that 22 is not found, I would say that it is working locally.
You might try installing nmap on the machine to see if there is a firewall blocking the port. At this point I would assume there is.
http://hpux.connect.org.uk/hppd/hpux/Networking/Admin/nmap-4.76/
NOTE: you are more that likely going to need to install the dependencies for nmap.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2009 05:58 AM
тАО03-13-2009 05:58 AM
Re: SFTP without applying password in script
Have you checked with your network/firewall team?
>>>client01# telnet localhost 22
Trying...
Connected to localhost.armstrong.com.
Escape character is '^]'.
SSH-1.99-OpenSSH_5.1p1+sftpfilecontrol-v1.2-hpn13v5
Connection closed by foreign host.
<<<
This says sshd is running on client01. The most suspect thing is firewall. You need to ask the firewall team to open the port between these two servers.
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2009 08:14 AM
тАО03-13-2009 08:14 AM
Re: SFTP without applying password in script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2009 08:53 AM
тАО03-13-2009 08:53 AM
Re: SFTP without applying password in script
Just a thought,
Rita
...The suggestion to use scp might help you, once your keys are properly in place on both sides, you should only have to put in the password the first time. After that it won't ask for it.....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-18-2009 03:48 AM
тАО03-18-2009 03:48 AM
Re: SFTP without applying password in script
Kindly suggest me to proceed further
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-18-2009 03:49 AM
тАО03-18-2009 03:49 AM