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 7757353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:04:19+00:00 2026-06-01T13:04:19+00:00

I am trying to avoid using Net::SSH::Perl library since there is some problems in

  • 0

I am trying to avoid using Net::SSH::Perl library since there is some problems in installing the module using CPAN. Manual install seems too troublesome when I see that it depends on a long list of other Perl modules.

What I am trying to achieve is to log into the SSH with my username and password. Then I will need to run some commands in it and retrieve some files from the server using SSH.

I know how to pass the username, hostname and command using “ssh($username.”@”.$ip, $command) or die “SSH fails!”;”. However, I keep getting this error message:

ssh: connect to host XX.XX.XX.XXX port 22: Connection refused

where XX.XX.XX.XXX is the hostname or IP address of my computer and is in the subnet as the server that I am trying to get files from.

Does anyone knows how I can pass in the password to SSH or introduce me to good tutorials on Net::SSH? Most of the tutorials I found online are on Net::SSH::Perl and not for Net::SSH.

  • 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-06-01T13:04:20+00:00Added an answer on June 1, 2026 at 1:04 pm

    Did you see this FAQ section of the Net::SSH documentation?

    Q: How do you supply a password to connect with ssh within a perl
    script using the Net::SSH module?

    A: You don’t (at least not with this module). Use RSA or DSA keys. See
    the quick help in the next section and the ssh-keygen(1) manpage.

    A #2: See Net::SSH::Expect instead.

    The suggestion to try Net::SSH::Expect is a good one. It sounds, based on what you’ve said, that it fits your needs.
    I have used Net::SSH::Expect quite a bit and I can attest to its simplicity if you’re just looking to get something done quickly

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

Sidebar

Related Questions

I'm trying to avoid using Interface Builder as much as possible. At the moment
I'm trying to do some caching using VaryByParam AND VaryByHeader. When an AJAX request
I am using MySQL .net connector 6.4.4.0 and Entity Frame work 4.1 and trying
Is there a way to detect page refresh without using viewstate in asp.net webforms
We often come into problems with .NET validators on elements that are hidden using
I am trying to leverage ORM given the following requirements: 1) Using .NET Framework
I'm trying to use some AJAX and ASP.Net together to enable me to run
I am trying to make a simple web application using ASP.NET and Interop COM.
I'm trying to use impersonation with my WCF service (using net.tcp binding) hosted in
After trying to avoid JavaScript for years, Iv started using Query for validation in

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.