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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:19:38+00:00 2026-06-15T13:19:38+00:00

We have a rails app that needs to ssh to a remote server (unix)

  • 0

We have a rails app that needs to ssh to a remote server (unix) and do some command line stuff. I don’t know a lot about security, so looking for advice. Currently, the controller receives a submit from the view, with a password in the params hash (not hashed, or anything). Then we use Net::SSH gem to ssh to the remote server and do stuff. This seems all kinds of un-safe. Our thoughts were:

  • Setting up public key authentication over SSH, so no pw would be required
    (we have a small number of users, so setting this up would be no problem)

OR

  • hash the password in the view, decode in the controller and then invoke the ssh commands

OR

  • hash and salt the pw in the view? (don’t really know how this works, just an idea)

Any links to articles or explanations, greatly appreciated. Thanks!

  • 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-15T13:19:40+00:00Added an answer on June 15, 2026 at 1:19 pm

    With public key authentication, you’re just authenticating between your webserver and the server you’re ssh’ing to. So if I understand your layout, then anyone who goes to the page doesn’t need a password to get in. If you are passing a password via post, you can simply filter it from your logs with something like this

    filter_parameter_logging :password
    

    in your Application controller. Then its just being passed around in memory, not stored anywhere static. Though hashing and salting in the view via javascript and then decoding in the controller is probably still a good idea if you aren’t using SSL. I’m certainly not going to recommend against an extra security measure that is fairly simple to implement…

    Edit: Looks like the way to filter parameters in Rails 3 is

    config.filter_parameters += [:password]
    

    in config/application.rb

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

Sidebar

Related Questions

I have a MySQL/Rails app that needs search. Here's some info about the data:
I have some functionality in a rails 3.2 app that needs to be driven
I have a Rails app that needs to expose values from a database as
I have a silverlight application that needs to talk to a rails app to
I have a rails app that I'm moving to another server and I figure
I have a Ruby on Rails app that needs process many background jobs simultaneously:
I have a gallery in my rails app that needs to only allow certain
I have a Rails app that needs to send out emails with a particular
I have a rails app that tracks membership cardholders, and needs to report on
I have a rails CMS app that manages content for a production web server

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.