Approach to writting a script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Approach to writting a script
# 8  
Old 02-05-2009
Code:



# ssh-keygen -b 2048 dsa # This generates your key-pair
# Enter to save to /home/sroot/.ssh/id_dsa
# Enter passphrase (empty for no passphrase): Enter
# Saved in /home/sroot/.ssh/id_dsa.pub
# ssh remoteHost
# mkdir ~/.ssh
# chmod 0700 ~/.ssh
# Paste the contents of (local) ~/.ssh/id_rsa.pub into (remote) ~/.ssh/authorized_keys

Logout and try again to log in. If it doesn't ask for a password, you're all set

I couldn't ssh to the remote machine, so I used a putty I had open already
It wouldn't let me in without a password.
Maybe it's because on the remote it's root, and the local is sroot?

I tried both dsa and rsa
# 9  
Old 02-05-2009
Why couldn't you ssh to the remote machine (and which one of the two)?
# 10  
Old 02-12-2009
I suspect part of the ssh login problem is that on one machine it's username root, on the other it's sroot
Could that be the problem?
# 11  
Old 02-12-2009
Should not be the problem, as long as the target machine has the authorized_keys correctly corresponding with the .pub on the local one. Just make sure that though you are sroot here, you are ssh'ing to root there.
Code:
ssh root@dest

# 12  
Old 03-20-2009
How to clone a 1950 with two 500GB drives in raid

Easy on Windows, but how do I do it on rhel4?
# 13  
Old 03-20-2009
Is this a new question for the group?
# 14  
Old 03-21-2009
Quote:
Originally Posted by fpmurphy
Is this a new question for the group?
How odd is that! I thought I started a new thread.
I've been posting to the internet for 15 years, never did that before!
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

What is the right approach to take?

Hello every one, I will love to know what is the best approach to take in obtaining books online. I find it disturbing just googling a book online and downloading it without actually paying for it. I strongly believe that this is wrong and that i may not be able to unlock the key contents and... (2 Replies)
Discussion started by: despiragado
2 Replies

2. Shell Programming and Scripting

Help with approach and developing script

Hi- I need to develop a script for following scenario in AIX and K shell environment.I am from windows server background for most my career ,so please bear with me and advise suitable approach and technical assistance.Having said that I am aware of unix shell commands but never pput together at... (1 Reply)
Discussion started by: nirasm
1 Replies

3. Red Hat

What would be the best approach?

I have a table in one of my DB. The DB is about 300 gig - of that 249 gig is in this table. The data is somewhat important but even if we delete half of it won't affect anybody. I would like to reclaim some space back so my question is what would be the best approach to accomplish this task.... (6 Replies)
Discussion started by: newborndba
6 Replies

4. Programming

Oracle Procedure approach

HI All , I am new to oracle procedures. Please help me for the approach to satify the requirement. I need to create procedures. with parameters passed ( say report,type,identities,country ) It should also call sql query within the procedures and passed parameters should be used in where clause... (2 Replies)
Discussion started by: Perlbaby
2 Replies

5. Shell Programming and Scripting

Need advice on approach for script

Greetings all. I have a repository server which receives, without exhaggeration, several million files a week. The majority of these files are in .csv format, which means they're highly compressable. They are spread throughout numerous directories where there are configured monitoring utilities... (4 Replies)
Discussion started by: msarro
4 Replies

6. SuSE

Write shell script using menu-driven approach to show various system

QUESTION: Write shell script using menu-driven approach to show various system configuration like 1) Currently logged user and his logname 2) Your current shell 3) Your home directory 4) Your current path setting 5) Your current working directory 6) Show Currently logged number of... (1 Reply)
Discussion started by: bboyjervis
1 Replies

7. Shell Programming and Scripting

writting a shell script to delete damage files

hi, I have 100 files say File1.mp3, File2.mp3 .......file100.mp3 i found that File1.mp3 to File50.mp3 are damaged. I want to delete the damaged files from the directory using sed with regex how can i do this. thanks (5 Replies)
Discussion started by: pchangba
5 Replies

8. Shell Programming and Scripting

Scp without writting

Hi, i have a file (filename xyz.file) and i scp it daily to server B. B runs a job daily and remove it. A sends it at 9am, B removes it at 915am. Now i have another server C, it also scp a file (xyz.file) to B. C will send to B at 930am and B will remove it at 10am. My worry is if B fails to... (7 Replies)
Discussion started by: new2ss
7 Replies

9. Shell Programming and Scripting

Writting to multiple file

Hi!, My script generates a lot of files while running.. The same output at any point may be diercted to some of them.. if I have 4 files file1 file2 file3 file4, echo "output" to file1 file2 file3 file4 Any ideas on how to do it?? (2 Replies)
Discussion started by: jyotipg
2 Replies
Login or Register to Ask a Question