Script to log in SFTP server [with username, password]
Hi, everyone, I am trying to write a script to login automatically using username and password to an sftp server (the key authentication has been disabled so I cannot use that method).
I tried to search online for a solution and found a way using "expect" but my boss does not want me to use expect since the passwords need to be provided in plain-text.
I am a newbie about this sftp server. Please help out, thanks alot
Hi, thanks for your reply, but what I want is not really the way to teak the password but just the script to login to sftp server automatically (like just run the script). I tried to use this "expect" code:
But my boss does not want me to use "expect" so if there other way I can log in without "expect" I would really appreciate it (I know it is very not wise to use pass and username in SFTP, but the server is that way, I can not change it T___T).
Thanks for your hep
Hi, so since you guys say there is no other way, I just write the code using expect, it works seems to be fine but it does not call up the cmdFile, so basically the code is the same as above, here is the trial cmdFile that I wrote:
But it does not work, the server is connected but never do anything after that:
Can anyone point out the problem with my code, is the cmdFile have any problem, thanks ,oh for the cmdFile I code in the whole file path so that should not be the issue, thanks
Hi I am new to shell scripting,
Can you please help me in writing a script that can switch user in same server with different user name and same password.
I want to perform some functional task in a particular user and need to switch user and perform same activity in another user and so on ...
... (4 Replies)
Hi Team,
i want to input two password for single node like pass1/pass2 one of the pass1 is working some node and pass2 is working for some nodes .
For nodes having pass1 i have to run different script and
for nodes having pass2 i have to run different script
Sooo
how can put two pass... (3 Replies)
Hi,
I am trying to automate the process of fetching files from remote server to local server through sftp. I have the username and password for the remote solaris server. But I need to give password manually everytime i run the script.
Can anyone help me in automating the script such that it... (3 Replies)
I am trying to connect to remote server in hp-ux, using sftp command (using sftp username@ip and password ) able to connect to remote server but, in this case sftp prompt for password and user need to manually enter it.
I want sftp can read a password define in script or from file, so it can... (1 Reply)
Hello All,
I am stuck!
I have access to an external server via SFTP. In order to access the external server I was given a specific port, password, and a ppk.
I would to create a script on my server end that can I can setup as a corn job, that will connect to the external server and... (1 Reply)
Hi;
I had set up NFS server in one ubuntu box and mounted few directories using it.
In order to access those directories across the network i m using j-ftp(an open source java network client) from other boxes in the same network.I am able to view my mounted directories in the server through it.... (1 Reply)
All,
Is there a possibility to sftp a file from one AIX server to another AIX server with password? I do not want to use public or private key option as we would have required privileges for creating the keys. So Please provide the needful with a sample script.
Thanks in Advance,
Vijayakumar S... (2 Replies)
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)
Dear all
i want to ssh to a server via running a shell script with a username and i want to hard code the password for that particular username
can u help me please
Thank u
Naree (8 Replies)
Can we write a script to telnet to a unix server from unix with the username and password hardcoded in the script??
something like ssh a@b -p password ??? (5 Replies)