Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMike Zhu
1,840 PointsSSH is not a directory
Actually, I generate an SSH key and after typing the "ls -la", it can shows the list of the files like below: total 64 drwxr-xr-x+ 27 Mike staff 918 Jun 19 00:53 . drwxr-xr-x 5 root admin 170 May 22 12:12 .. -r-------- 1 Mike staff 9 May 19 20:18 .CFUserTextEncoding -rw-r--r--@ 1 Mike staff 14340 Jun 19 00:33 .DS_Store drwx------ 39 Mike staff 1326 Jun 17 17:23 .Trash drwxr-xr-x 12 Mike staff 408 Jun 11 23:28 .android -rw------- 1 Mike staff 1975 Jun 19 00:55 .bash_history drwxr-xr-x 3 Mike staff 102 Jun 8 12:38 .composer drwxr-xr-x 4 Mike staff 136 May 29 16:25 .gem drwxr-xr-x 4 Mike staff 136 Jun 11 22:49 .gradle -rw------- 1 Mike staff 1675 Jun 19 00:53 .ssh -rw-r--r-- 1 Mike staff 396 Jun 19 00:53 .ssh.pub drwxr-xr-x 6 Mike staff 204 Jun 3 17:51 .subversion drwxr-xr-x 9 Mike staff 306 Jun 18 23:54 .vagrant.d drwxr-xr-x 3 Mike staff 102 Jun 11 22:49 AndroidStudioProjects drwxr-xr-x 2 Mike staff 68 May 20 17:51 Applications drwx------+ 20 Mike staff 680 Jun 12 23:19 Desktop drwx------+ 17 Mike staff 578 Jun 8 17:00 Documents drwx------+ 198 Mike staff 6732 Jun 18 23:45 Downloads drwxr-xr-x 15 Mike staff 510 Jun 19 00:19 Homestead drwx------@ 59 Mike staff 2006 Jun 18 23:44 Library drwx------+ 3 Mike staff 102 May 19 17:36 Movies drwx------+ 4 Mike staff 136 May 19 22:54 Music drwx------+ 5 Mike staff 170 May 28 01:00 Pictures drwxr-xr-x+ 6 Mike staff 204 May 28 01:20 Public -rw-r--r-- 1 Mike staff 0 Jun 8 12:38 composer.phar drwxr-xr-x 58 Mike staff 1972 Jun 11 14:18 xcode-themes
The only difference between the video is the ssh is "-rw-------", and I don't really know what it means.
But after I type "cd .ssh" it shows: MikesdeMacBook-Pro:~ Mike$ cd .ssh -bash: cd: .ssh: Not a directory
Besides, the "homestead.yam" writes like this: authorize: ~/.ssh/id_rsa.pub
keys: - ~/.ssh/id_rsa
Instead of ~/Users/.ssh in the video. I am not sure whether it is normal or not.
I really not sure why it shows "-bash: cd: .ssh: Not a directory" and I am not sure what step I went wrong.
1 Answer
thomascawthorn
22,986 PointsHey man!
cd stands for 'change directory'. If you try and navigate into something that isn't a directory, you get this error. For example, say you have a folder that contains your wonderful holiday photos. You could 'cd' into that folder, but you couldn't 'cd' into an image (because it's an image not a folder).
The .ssh file is essentially a text file, so you could read it with:
sudo nano .ssh
Nano is a command line text editor (you may also have herd of vim or vi - nothing to worry about). P.s. if you try nano, it's not clear how to exit. To exit nano do ctrl + x. If you wish to save your changes press 'Y' (for yes) and 'N' (for no).
Hope this helps explain your problem - if you have questions about what comes next, ask away! :)