06-03-2011
One trick to make it run without expect is to ssh to yourself localhost first, so the password goes in that ssh stdin. Then you can scp -rp all the local .ssh/ subtree to the remote and you are trusted, except the localhost/127.0.0.1 keys are wrong.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
how to use the arrow keys in shell scripting. is there any special synatax / command for this.
i just want to use the arrow keys for navigation.
replies appreciated
raguram R (3 Replies)
Discussion started by: raguramtgr
3 Replies
2. Shell Programming and Scripting
Hello to all...this is my first post (so please go easy). :)
I feel pretty solid at expect scripting, but I'm running into an issue that I'm not able to wrap my head around. I wrote a script that is a little advanced for logging into a remote Linux machine and changing text in a file using sed.... (2 Replies)
Discussion started by: v1k0d3n
2 Replies
3. Shell Programming and Scripting
This Expect script provides expect with a list of IP addresses to Cisco IPS sensors and commands to configure Cisco IPS sensors. The user, password, IP addresses, prompt regex, etc. have been anonymized. In general this script will log into the sensors and send commands successfully but there are... (1 Reply)
Discussion started by: genewolfe
1 Replies
4. Shell Programming and Scripting
Hello!!
I am trying to write a script to verify if theres an id_rsa.pub, if not then create one. After creating one to send it to antoher servers authorization keys file.
Hope that makes sense-lol.
Heres what I have so far:
Cd .ssh
Cat id_rsa.pub
If not then ssh-keygen -t rsa
Then... (3 Replies)
Discussion started by: bigben1220
3 Replies
5. HP-UX
basically there are several different versions of hpux, this script is for particular version that is non-trusted but also does not use any shadow files.This one is a little harder to do.
Usually the time stamp of the last password change is stored as an epoch number in the shadow file, for... (3 Replies)
Discussion started by: sparcguy
3 Replies
6. Shell Programming and Scripting
ok, I'm new to the forum and I did a few searches and didn't find much on this so here goes.
I have a ksh I use to call an expect script that opens a ssh session and then extracts a tar file. The tar file has my prefered .profile and my ssh keys. I want to run this script 1 time on new servers and... (2 Replies)
Discussion started by: gtsonoma
2 Replies
7. Programming
Hi,
Am very new to expect scripting..
Can You please suggest me how to call an expect script inside another expect script..
I tried with
spawn /usr/bin/ksh
send "expect main.exp\r"
expect $root_prompt
and
spawn /usr/bin/ksh
send "main.exp\r"
expect $root_prompt
Both... (1 Reply)
Discussion started by: Priya Amaresh
1 Replies
8. Programming
I have an expect script called remote that I want to call from inside my expect script called sudoers.push, here is the code that is causing me issues:
set REMOTE "/root/scripts/remote"
...
log_user 1
send_user "Executing remote script as $user...\n"
send_user "Command to execute is: $REMOTE... (1 Reply)
Discussion started by: brettski
1 Replies
9. Shell Programming and Scripting
Dear All,
I have a requirement where I have to SFTP or SCP a file in a batch script. Unfortunately, the destination server setup is such that it doesn't allow for shell command line login. So, I am not able to set up SSH keys. My source server is having issues with Expect. So, unable to use... (5 Replies)
Discussion started by: ss112233
5 Replies
10. Programming
I'm fairly new to scripting so this might not be possible.
I am using Expect with Cisco switches and need to capture the string after finding the expect request. For example, when I issue "show version" on a Nexus switch, I'm looking to capture the current firmware version:
#show version
... (0 Replies)
Discussion started by: IBGaryA
0 Replies
LEARN ABOUT DEBIAN
apt-key
APT-KEY(8) APT APT-KEY(8)
NAME
apt-key - APT key management utility
SYNOPSIS
apt-key [--keyring filename] {add filename | del keyid | export keyid | exportall | list | finger | adv | update | net-update |
{-v | --version} | {-h | --help}}
DESCRIPTION
apt-key is used to manage the list of keys used by apt to authenticate packages. Packages which have been authenticated using these keys
will be considered trusted.
COMMANDS
add filename
Add a new key to the list of trusted keys. The key is read from the filename given with the parameter filename or if the filename is -
from standard input.
del keyid
Remove a key from the list of trusted keys.
export keyid
Output the key keyid to standard output.
exportall
Output all trusted keys to standard output.
list
List trusted keys.
finger
List fingerprints of trusted keys.
adv
Pass advanced options to gpg. With adv --recv-key you can download the public key.
update
Update the local keyring with the archive keyring and remove from the local keyring the archive keys which are no longer valid. The
archive keyring is shipped in the archive-keyring package of your distribution, e.g. the debian-archive-keyring package in Debian.
net-update
Perform an update working similarly to the update command above, but get the archive keyring from a URI instead and validate it against
a master key. This requires an installed wget(1) and an APT build configured to have a server to fetch from and a master keyring to
validate. APT in Debian does not support this command, relying on update instead, but Ubuntu's APT does.
OPTIONS
Note that options need to be defined before the commands described in the previous section.
--keyring filename
With this option it is possible to specify a particular keyring file the command should operate on. The default is that a command is
executed on the trusted.gpg file as well as on all parts in the trusted.gpg.d directory, though trusted.gpg is the primary keyring
which means that e.g. new keys are added to this one.
FILES
/etc/apt/trusted.gpg
Keyring of local trusted keys, new keys will be added here. Configuration Item: Dir::Etc::Trusted.
/etc/apt/trusted.gpg.d/
File fragments for the trusted keys, additional keyrings can be stored here (by other packages or the administrator). Configuration
Item Dir::Etc::TrustedParts.
/etc/apt/trustdb.gpg
Local trust database of archive keys.
/usr/share/keyrings/debian-archive-keyring.gpg
Keyring of Debian archive trusted keys.
/usr/share/keyrings/debian-archive-removed-keys.gpg
Keyring of Debian archive removed trusted keys.
SEE ALSO
apt-get(8), apt-secure(8)
BUGS
APT bug page[1]. If you wish to report a bug in APT, please see /usr/share/doc/debian/bug-reporting.txt or the reportbug(1) command.
AUTHOR
APT was written by the APT team <apt@packages.debian.org>.
AUTHORS
Jason Gunthorpe
APT team
NOTES
1. APT bug page
http://bugs.debian.org/src:apt
APT 0.9.7.9 09 June 2012 APT-KEY(8)