Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

initially i am trying to connect with github with RSA key and it is giving error permission denied...unknown host. Then change my ~/.ssh directory permission to

 chmod 700 ~/.ssh
 chmod 600 ~/.ssh/
 chmod 600 ~/.ssh/.*

after that my Termianl Screen is changed and all settings are went, font color is smoke white and facing these problem:-

-bash: /home/gaurav/.bash_profile: Permission denied

After that login via sudo

gaurav@gaurav-Satellite-L640:/$ sudo login

gaurav-Satellite-L640 login: gaurav


Welcome to Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-35-generic-pae i686)**

 * Documentation:  https://help.ubuntu.com/

  System information as of xxxxxxxxxxxxx

  System load:  0.6                Processes:           220
  Usage of /:   58.0% of 54.13GB   Users logged in:     1
  Memory usage: 52%                IP address for eth1:
  Swap usage:   0%

  Graph this data and manage this system at https://landscape.canonical.com/

46 packages can be updated.
0 updates are security updates.

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

No directory, logging in with HOME=/ 

gaurav@gaurav-Satellite-L640:/$ ls

bin  boot  cdrom  data  dev  etc  home  initrd.img  initrd.img.old  lib  lost+found  media  mnt  opt  proc  root  run  sbin  selinux  srv  sys  tmp  usr  var  vmlinuz  vmlinuz.old

gaurav@gaurav-Satellite-L640:/$ sudo nano ~/.bash_profile

[[ -s "$HOME/.bashrc" ]] && source "$HOME/.bashrc"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

How enable root login and my pervious setting. I also restarted my pc and NOT enable to work.

share|improve this question
What are the permissions on your .bash_profile ? What's in your .bashrc ? Also you should chmod 700 your .ssh, never chmod 600 a directory or you won't be able to access it ("execute" it) –  Samuel Peter Nov 26 '13 at 2:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.