Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tail log via ssh with password not working #47

Open
rafaelbiriba opened this issue Feb 2, 2015 · 2 comments
Open

tail log via ssh with password not working #47

rafaelbiriba opened this issue Feb 2, 2015 · 2 comments

Comments

@rafaelbiriba
Copy link

After:
ssh user@server.com tail /opt/log/access.log | ngxtop
The ssh prompt the password...
After that nothing happens.

@mcortizo
Copy link
Contributor

mcortizo commented Feb 3, 2015

Hi Rafael!

I always login to remote servers with my private key, as it is more convenient than passwords.
If you have a public/private keys pair you can type this to put your public key into the remote server:

cat ~/.ssh/id_dsa.pub | ssh user@server.com 'cat - >> ~/.ssh/authorized_keys2'

If not, follow the instructions in http://mah.everybody.org/docs/ssh (previous code is from that page) to generate the pair and then put the public one into the server.

When you try to connect to a remote server, ssh asks for a password or a passphrase to unlock your private key, depending on the server configuration and the information it has about you (basically, your public key).
A tool called ssh agent can keep in the memory of your local terminal the information needed to access the private key, so you don't need to type your password or passphrase each time.

To start the ssh agent, type

ssh-add

Then, you'll be asked for the passphrase. After that, you should access to the remote server with no more prompts.

I hope this help you

@rajaravivarma-r
Copy link

Even I am facing this issue. I have to su - production_user to another user, for accessing the log files. production_user doesn't have direct ssh access. I don't know how to proceed with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants