.ssh directory question (Can i move it)


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers .ssh directory question (Can i move it)
# 1  
Old 01-24-2008
.ssh directory question (Can i move it)

Hi All,

pn:/wrk/an/tran/cr>) ls -ld .ssh
drwx------ 2 crcv1ftp canusr 96 May 2 2007 .ssh


I had .ssh directory inside a directory . When i trying to do find and delete automatic script . The find comman is failing saying it dont have permision to read .ssh .

Can i move the .ssh directory from the current to directory to on step below.

i mean moving .ssh directory from
:/wrk/an/tran/cr to :/wrk/an/tran/

will it create a problem ..

Please let me know .

Thanks,
Arun
# 2  
Old 01-24-2008
.ssh is the directory containing any key pairs you may have created. Should be in the user's home dir and contains your authorized_keys file (if you have one) and the list of known hosts ssh has encountered.

What user has /wrk/an/tran/cr as it's home directory?
If you move the .ssh directory, when that user next runs ssh it will create a new one and will identify any host you connect to as new, requiring you to answer a short question about trusting the host or not before connecting.
# 3  
Old 01-25-2008
MySQL

Thanks for the answer ..

One more question . Currently my .ssh directory has permision as below

drwx------ 2 pnlf pwr 96 Jun 2 2006 .ssh

can i change the permision of the directory ? as below

chmod 755 .ssh , so it will be as

drwxr-xr-x 2 pnlf pwr 96 Jun 2 2006 .ssh

would it make sense ? . Even if i changed the permsion when the user again run .ssh will this permssion be retained .

Thanks in advance ,
Arun.
# 4  
Old 01-25-2008
Just i read by google stating that .ssh can be in 755 mode and it is advicable to have that in 700 . But i need to set that in 755 mode so that my my find and delete will not fail .Please let me know can i make the .ssh in 755 mode .

Is it correct ot make that to 755 mode ?..

I know that .ssh will contains important files . If i make that to 755 mode will it lead to hacking kinds of activity ?..

Thanks,
Arun
# 5  
Old 01-27-2008
It's pretty well up to you. If you allow other's to read the contents of the .ssh dir, they cangrab your public key (if you have one) and use it to grant you access via ssh to accounts they control. If you keep it 0700 they can't do this.

The files in there you need to protect from people reading are the private keys mainly.
The big one is to not grant any write access to anyone other than yourself for the .ssh dir or any of the files in it.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script cannot create directory and move the file to that directory

I have a script, which is checking if file exists and move it to another directory if then mkdir -p ${LOCL_FILES_DIR}/cool_${Today}/monthly mv report_manual_alloc_rpt_A_I_ASSIGNMENT.${Today}*.csv ${LOCL_FILES_DIR}/cool_${Today}/monthly ... (9 Replies)
Discussion started by: digioleg54
9 Replies

2. Shell Programming and Scripting

How Create new directory and move files to that directory.?

Hi All, We have main directory called "head" under this we have several sub directories and under these directories we have sub directories. My requirement is I have to find the SQL files which are having the string "procedure" under "head" directory and sub directories as well. And create... (14 Replies)
Discussion started by: ROCK_PLSQL
14 Replies

3. UNIX for Dummies Questions & Answers

How to move gz files from one source directory to destination directory?

Hi All, Daily i am doing the house keeping in one of my server and manually moving the files which were older than 90 days and moving to destination folder. using the find command . Could you please assist me how to put the automation using the shell script . ... (11 Replies)
Discussion started by: venkat918
11 Replies

4. Shell Programming and Scripting

List files with date, create directory, move to the created directory

Hi all, i have a folder, with tons of files containing as following, on /my/folder/jobs/ some_name_2016-01-17-22-38-58_some name_0_0.zip.done some_name_2016-01-17-22-40-30_some name_0_0.zip.done some_name_2016-01-17-22-48-50_some name_0_0.zip.done and these can be lots of similar files,... (6 Replies)
Discussion started by: charli1
6 Replies

5. UNIX for Dummies Questions & Answers

Zip all files in a directory and move to another directory

Hi, need to zip all files in a directory and move to another directory after the zip.. i am using this one but didnt help me... zip -r my_proj_`date +%Y%m%d%H%MS`.zip /path/my_proj mv in_proj_`date +%Y%m%d%H%M%S`.zip /path/source/ i am trying to zip all the files in my_proj... (0 Replies)
Discussion started by: dssyadav
0 Replies

6. UNIX for Dummies Questions & Answers

question in MV command (will move work with 100% used directory)

Dear all, I am facing a issue in MV command, this move is done by our c program. We are moving the file to same directory so basically I think it will be a rename of the inode. So we might not useany extra space then why the move is failing. Does it require space to move the same size of file... (5 Replies)
Discussion started by: arunkumar_mca
5 Replies

7. Shell Programming and Scripting

Move the latest or older File from one directory to another Directory

I Need help for one requirement, I want to move the latest/Older file in the folder to another file. File have the datetimestamp in postfix. Example: Source Directory : \a destination Directory : \a\b File1 : xy_MMDDYYYYHHMM.txt (xy_032120101456.txt) File2: xy_MMDDYYYYHHMM.txt... (1 Reply)
Discussion started by: pp_ayyanar
1 Replies

8. Shell Programming and Scripting

Move a file from windows directory to unix directory

Move a file from windows directory to unix directory, is this possible? if it is, can someone help me on this? Thanks! God bless! (1 Reply)
Discussion started by: kingpeejay
1 Replies

9. UNIX for Dummies Questions & Answers

Move all files in a directory tree to a signal directory?

Is this possible? Let me know If I need specify further on what I am trying to do- I just want to spare you the boring details of my personal file management. Thanks in advance- Brian- (2 Replies)
Discussion started by: briandanielz
2 Replies
Login or Register to Ask a Question