ssh key stops functioning after a while

I was using git on a remote server (Ubuntu 14.04 LTS). It works smoothly, until a certain amount of time passed by. I was denied access to the repository (no this issue on my local machine). How does this happen? And is there anyway to solve it?

  • git-svn fetch fails on file whose size > LONG_MAX
  • How do I add a branch to my repository that is in gitosis
  • How to commit a git repository inside another git repository
  • How can I merge remote and local changes in my copied repository?
  • Can I view instant results after a git push?
  • How to pass a programmatically generated list of files to `git filter-branch`?
  • Failed to clone repository on Windows 8
  • How to output git log with the first line only?
  • Git: how to get a list of all revisions since some commit?
  • git pull causing “unlink of file failed” error
  • Github and Heroku repos? How to read, push, pull, and generally keep them synced
  • Deleted files in git repo still present in bitbucket account
  • 2 Solutions collect form web for “ssh key stops functioning after a while”

    First, an ssh key does not “expire” (ssl certificates do, but that is another topic). They are revoked (removed from the .authorized_keys on the remote side)

    Second, if it was working and no longer work, something must have changed, like the $HOME value (since ssh looks for a public/private key in $HOME/.ssh)

    If is possible that the process using ssh does not run with the usual account, but with another user (or with root if preceded by sudo)

    Another possibility – if the git server is moved seamlessly to another Linux machine (keeping the same IP).
    In this case this new git server will have new ssh key.

    Git Baby is a git and github fan, let's start git clone.