Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6830393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:36:44+00:00 2026-05-26T22:36:44+00:00

I need to perform on my linux 5.3 ssh [Linux machine red hat 5.3]

  • 0

I need to perform on my linux 5.3

   ssh [Linux machine red hat 5.3] date

in order to get the date results , during ssh need to answer on the following question

  1. (yes/no)? –> yes
  2. password: –> diana_123

and then I will get the date results

please advice how to do this automated process with python? ( on my Linux I have
Python 2.2.3 )

python script should get the IP address number , and perform automatically ssh to 103.116.140.151 and return the date results

     as -->  Fri Nov 18 11:25:18 IST 2011

example of manual proccess:

  # ssh 103.116.140.151 date
    The authenticity of host '103.116.140.151 (103.116.140.151)' can't be established.
    RSA key fingerprint is ad:7e:df:9b:53:86:9f:98:17:70:2f:58:c2:5b:e2:e7.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added '103.116.140.151' (RSA) to the list of known hosts.
    root@10.116.10.151's password: 

    Fri Nov 18 11:25:18 IST 2011
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:36:45+00:00Added an answer on May 26, 2026 at 10:36 pm

    The easiest way would be to just configure passwordless logins. Basically, create a local ssh key pair with

    ssh-keygen -t rsa
    

    and put the public key into $HOME/.ssh/authorized_keys at 103.116.140.151. If you don’t care about the key of the remote host, add the -oStrictHostKeyChecking=no ssh option.

    Alternatively, use an SSH library such as Paramiko:

    import paramiko
    ssh = paramiko.SSHClient()
    # Uncomment the following line for the equivalent of -oStrictHostKeyChecking=no
    #ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
    ssh.connect('103.116.140.151', username='user', password='diana_123')
    stdin, stdout, stderr = ssh.exec_command("date")
    date = stdout.read()
    print(date)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We need to perform the following operation in our database : There is a
I need a method to perform the following task, suppose if I have a
I need to perform a few checks (enable or disable a label elsewhere on
I need to perform a find and replace using XSLT 1.0 which is really
I need to perform an action after a session times out. However I have
I need to perform operations on Lua tables from C where the tables are
I need to perform some operations on all folders within a file share which
I need to perform update/insert simultaneously changing structure of incoming data. Think about Shops
I need to perform lots of evaluations of the form X(:,i)' * A *
I need to perform a very large sql server insert from a c# application.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.