Ask Question Forum:
Model Library:2025-02-08:A.I. model is online auto reply
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by Babu Sampath
at 2024-07-19 07:36:49
Point:500 Replies:9 POST_ID:829029USER_ID:11932
Topic:
Linux;;
Hello experts,
i have to login to multiple servers using ssh and i wish to automate it,
after doing ssh,
it prompts - Are you sure you want to continue connecting (yes/no)? --> i need to give input as yes
then it prompts for password ----> i need to input my password then
and execute a command and log out.
Please let me know a way to automate it.
i have checked sshpass utility is not present in the server im working on. please suggest.
thanks
i have to login to multiple servers using ssh and i wish to automate it,
after doing ssh,
it prompts - Are you sure you want to continue connecting (yes/no)? --> i need to give input as yes
then it prompts for password ----> i need to input my password then
and execute a command and log out.
Please let me know a way to automate it.
i have checked sshpass utility is not present in the server im working on. please suggest.
thanks
Expert: Gerwin Jansen replied at 2024-07-22 07:14:12
Generate SSH keys on the server that you have access to, add public key to the other servers ~/.ssh/authorized_keys
Then from the server that you have access to, run a command like this:
ssh user@other_server_1 command
Test with a few servers first, then add the public keys to the others.
Then from the server that you have access to, run a command like this:
ssh user@other_server_1 command
Test with a few servers first, then add the public keys to the others.
Author: Babu Sampath replied at 2024-07-22 06:31:24
yes...i understand but if you see i have few hundreds of server, to setup ssh across all is going to take a considerable time.#
the username/password im going to use to the servers is same.
Im not against ssh, please let me know if there is a way to speedup ssh setup in this case.
the username/password im going to use to the servers is same.
Im not against ssh, please let me know if there is a way to speedup ssh setup in this case.
Expert: Gerwin Jansen replied at 2024-07-22 06:13:48
>> but we need a solution to fix it
Using SSH keys will do just that for you.
Using SSH keys will do just that for you.
Author: Babu Sampath replied at 2024-07-22 02:52:35
Yes, we are aware its a bad practise but we need a solution to fix it..
it is the need of this moment :(.
it is the need of this moment :(.
Expert: Gerwin Jansen replied at 2024-07-19 13:07:20
Using passwords on a command line is a bad practice. Setup SSH keys and automation is easy just do:
ssh user@server command
There are some previously answered quesions about setting up SSH keys here at EE like this one for example:
http://www.experts-exchange.com/Networking/Protocols/SSH_Telnet/Q_23292354.html
ssh user@server command
There are some previously answered quesions about setting up SSH keys here at EE like this one for example:
http://www.experts-exchange.com/Networking/Protocols/SSH_Telnet/Q_23292354.html
Expert: duncanb7 replied at 2024-07-19 08:40:06
Sorry, missing it is linux tag
Please get to know what is the exact port from adminstrator
I think the thing is similar to linux
Duncan
Please get to know what is the exact port from adminstrator
I think the thing is similar to linux
Duncan
Author: Babu Sampath replied at 2024-07-19 08:38:15
Thanks for the reply Duncan.
I cant do it from command line, i have to execute the script from a server..it is because of security..access to these servers from my desktop is not allowed.
I checked your command from the server it says - Bad port 'w'.
I cant do it from command line, i have to execute the script from a server..it is because of security..access to these servers from my desktop is not allowed.
I checked your command from the server it says - Bad port 'w'.
Expert: duncanb7 replied at 2024-07-19 08:28:38
Be reminded, if the SSH change, the command should be this, where 8888 is just example
port change
c:program fiies <x86>Puttyputty.exe -ssh yourogin@214.3..211283 -pw yourpassword -P 8888
Duncan
port change
c:program fiies <x86>Puttyputty.exe -ssh yourogin@214.3..211283 -pw yourpassword -P 8888
Duncan
Expert: duncanb7 replied at 2024-07-19 08:26:38
putty.exe can run at command-line such as
c:program fiies <x86>Puttyputty.exe -ssh yourogin@214.3..211283 -pw yourpassword
You can make easy batch script to login all server automatically
Duncan
c:program fiies <x86>Puttyputty.exe -ssh yourogin@214.3..211283 -pw yourpassword
You can make easy batch script to login all server automatically
Duncan