Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.networking > #2582
| From | Jamma Tino Schwarze <jamma-usenet@tisc.de> |
|---|---|
| Newsgroups | comp.os.linux.networking |
| Subject | Re: Automate user/pass transmission? |
| Date | 2013-11-25 10:14 +0000 |
| Organization | Individual Network Chemnitz, FRG |
| Message-ID | <l6v7te$bde$3@easy5.in-chemnitz.de> (permalink) |
| References | <bfgk1qFmtdaU1@mid.individual.net> |
Hi Dieter, Dieter Braun <dbraun@gmx.net> wrote: > I am trying to write a maintenance script which connects to a server > via SSH and cleans up several files.. I know e.g. that you can > transmit username and password of HTTP Auth like > http://user:pass@some.server.com, but how can I write a simple bash > file to connect via SSH? > I tried so far: - ssh dbraun@176.94.109.57 -p ku2jsx9r > - ssh -p ku2jsx9r dbraun@176.94.109.57 You are looking for public key authentication. Providing passwords in clear text is a bad idea. Short HOWTO: - on CLIENT * run ssh-keygen -t dsa, no to enter a pass phrase * scp .ssh/id_dsa.pub dbraun@176.94.109.57:client-id_dsa.pub - on SERVER: * mkdir .ssh * cat client-id_dsa.pub >> .ssh/authorized_keys Afterwards, a simple "ssh dbraun@176.94.109.57" should work without prompting for a password. Of course, take care to secure .ssh/id_dsa since it holds the private key neccessary for login. HTH, Jamma. -- "What we nourish flourishes." - "Was wir nähren erblüht." www.tisc.de
Back to comp.os.linux.networking | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Automate user/pass transmission? Dieter Braun <dbraun@gmx.net> - 2013-11-25 10:36 +0100
Re: Automate user/pass transmission? Richard Kettlewell <rjk@greenend.org.uk> - 2013-11-25 10:13 +0000
Re: Automate user/pass transmission? Jamma Tino Schwarze <jamma-usenet@tisc.de> - 2013-11-25 10:14 +0000
Re: Automate user/pass transmission? Jorgen Grahn <grahn+nntp@snipabacken.se> - 2013-11-25 21:24 +0000
Re: Automate user/pass transmission? gof@somewhere.invalid (Adam Wysocki) - 2013-12-03 13:53 +0000
Re: Automate user/pass transmission? Richard Kettlewell <rjk@greenend.org.uk> - 2013-12-03 17:25 +0000
Re: Automate user/pass transmission? Jorgen Grahn <grahn+nntp@snipabacken.se> - 2013-12-04 23:14 +0000
Re: Automate user/pass transmission? Richard Kettlewell <rjk@greenend.org.uk> - 2013-12-04 23:24 +0000
Re: Automate user/pass transmission? Jorgen Grahn <grahn+nntp@snipabacken.se> - 2013-12-07 09:40 +0000
Re: Automate user/pass transmission? gof@somewhere.invalid (Adam Wysocki) - 2013-12-07 12:45 +0000
Re: Automate user/pass transmission? gof@somewhere.invalid (Adam Wysocki) - 2013-12-07 12:43 +0000
csiph-web