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

  • Home
  • SEARCH
  • 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 498775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:55:04+00:00 2026-05-13T05:55:04+00:00

I have this bash file, which asks for IP, password, etc. for OpenSSH to

  • 0

I have this bash file, which asks for IP, password, etc. for OpenSSH to a device.

Now, if i use ssh root@ip, i have to enter the password. This is really irritating. Secondly; i cannot let my script send commands to it.

This is what i want->

  1. Not the password thing; i already found something; but it tells me the commands are not found?:

    #!/usr/bin/expect -f

    spawn ssh root@$IPADDR

    expect "password:"

    sleep 1

    send "$rpass\r"

    1. I want the user to be able to see some menus where it can choose from; after that; every command is done for him. So like a new window, or something like that?

    2. I do not want to use:
      -Any external stuff
      -No extra editing of the SSH connection

BASH INFO: GNU Bash, v. 4.0.33(1)-release (i486-pc-linux-gnu), running on Linux Mint. But it got to be available for several linux distro’s, and also on Mac?

  • 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-13T05:55:04+00:00Added an answer on May 13, 2026 at 5:55 am

    Many tools go to great lengths to prevent what you are doing. I recommend using ssh public keys to solve this problem instead of passwords.

    The big alternative is to write your own modified ssh client based on the open source so as to take control of the password management.

    Oh, well, I forgot. You can probably outsmart this with a pty, since then /dev/tty will be what you control. expect might help you with this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 271k
  • Answers 271k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You probably want something like this. I'm assuming that (ContentPrvdr,… May 13, 2026 at 1:42 pm
  • Editorial Team
    Editorial Team added an answer Quick and dirty: $(function(){ var html = []; $('.bar').each(function(i, item)… May 13, 2026 at 1:42 pm
  • Editorial Team
    Editorial Team added an answer As warm-up, I want to give one sketchy solution that… May 13, 2026 at 1:42 pm

Related Questions

I am looking for a way to dump input into my terminal from a
I have a bash script file which starts with a function definition, like this:
I have a rather large SQL file which starts with the byte order marker
Ok, I have been working with Solaris for a 10+ years, and have never
I have two files which both contain a list of words. Is there an

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.