-1

Logging into my work station over SSH, I notice that none of my aliases work. Sure enough:

$ alias
$ source ~/.bashrc
Could not open a connection to your authentication agent.

So I googled the error message, but all the information that I could find relate to users of Cygwin or Putty logging into their Linux machines. In my case, I'm logging in from one Linux machine (Kubuntu 12.10) to another (Kubuntu 13.04). Also, I can actually log in and run commands. I just cannot source ~/.bashrc!

I ask here instead of on unix.SE as this seems more of a "connecting to remote machine properly" issue, which is very relevant to servers. As per the Help Center this seems on-topic. If mods feel that unix.SE is more appropriate, then I have no problems moving the question there.

Note that I tried to source ~/.bashrc because I had suspected that the aliases were not defined due to .bashrc not being read on SSH logins.

4
  • Why the downvote? How can I improve the question? Is there any important information that I did not include?
    – dotancohen
    Jun 16, 2013 at 10:50
  • What's in the .bashrc? Anything related to SSH key management (ssh-add)?
    – Sven
    Jun 16, 2013 at 10:55
  • @SvW: Actually, I do have ssh-add /some/file.pem in .bashrc. Commenting that out fixed it! Please post your comment as an answer so that I could accept it. Thanks!
    – dotancohen
    Jun 16, 2013 at 11:08
  • Tracing execution of Bash scripts can be helpful in diagnosing this type of problem. See this and this. Jun 16, 2013 at 11:30

2 Answers 2

1

This error message suggests that you have issues with connections to the SSH agent from inside the ~/.bashrc. Remove any calls to ssh-add from it and test again. If that fixes your problem, you can hunt for the root cause of the agent problem.

0
0

I'm not sure what you're trying to do with 'source'.

Add aliases to your ~/.bashrc and restart your session for them to work. If they don't, then provide the error symptoms.

2
  • He noticed that his aliases don't work, confirmed that none are defined with alias, tried to include them manually with sourcing .bashrc and got the error message while doing so. So, this are the error symptoms.
    – Sven
    Jun 16, 2013 at 11:02
  • I had suspected that the aliases were not defined due to .bashrc not being read on SSH logins.
    – dotancohen
    Jun 16, 2013 at 11:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .