The usual method of figuring out anything's IP address would be a DNS server. Just because you have a dynamic one doesn't rule this out... There's free DNS hosting available from various places, and your computer would keep the DNS entry updated by running a small monitor script.
Keeping going with your current solution, if you don't want it to use ssh-agent, you can just undo the environment variables ssh-agent sets:
It's not that I don't want to use ssh-agent, it's that you have to be present after a reboot to type in the passphrase to unlock the secret key to use it. The nature of a remote system is that I won't be present.
But, actually, I think this might work after all. I killed ssh-agent and ran ssh (the remote computer isn't remote yet--it's right here), and it did indeed use the key I specified and I think it executed the bash script I set "command" equal to in that test.
I have to experiment some more to see if it really will do just what I need.
It's not that I don't want to use ssh-agent, it's that you have to be present after a reboot to type in the passphrase to unlock the secret key to use it. The nature of a remote system is that I won't be present.
Well, sure, but you had the agent going anyway, and it messed up your program. I'm just telling you how to force it not to use ssh-agent without actually killing the agent. You can easily save the values for later if you want to put them back.
I have a similar problem and I have a solution that I've used for many years and has worked without much of a glitch.
First on my home server I have lynx installed, using it I have a script to get the ip by calling w w w . whatismyip . com (or another of the IP services), then I send an eMail with it and I update my home page on the homepage served by my ISP for my server.
First on my home server I have lynx installed, using it I have a script to get the ip by calling w w w . whatismyip . com (or another of the IP services), then I send an eMail with it and I update my home page on the homepage served by my ISP for my server.
My favorite such site is queryip.net/ip/ because you don't have to use lynx or much of a script to scrape the IP. The IP address is all that's returned. Here's the whole script:
Also, if your ISP maps your address to a URL (most do), you can get it this way:
Emailing it to myself is, of course, an option. I did that one place, but email turned out to be more fragile than I would have guessed. I have to authenticate myself to my ISP, so I must store my email password on the remote, and there's a third party involved with a not-very-trivial protocol.
I was hoping this would be simpler. Actually, I have it working well enough to achieve my purposes, but after I started working on it, I decided to expand it to a general logging capability. But that's not working. But I don't really need that, so maybe I'll let well-enough alone.
Hi,
I copied the key of rsa.pub to authorized_keys using the below command
cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys
By mistake i have executed another command
view cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys
so now additional keys are copied.so please help me... (3 Replies)
Hi
I have an ssh 'for' loop script to login and put a key on multiple servers. I need to append a file on each server but the command which works ok from the prompt does not work via the script. I have
cat filename | ssh user@servername "cat >>append.file.name"
I have tried to 'spawn' this in... (0 Replies)
Discussion started by: Grueben
0 Replies
3. Post Here to Contact Site Administrators and Moderators
I previously posted a question in the Shell Scripting forum a few minutes ago. I recieved a message telling me I had breached a rule, apparently because my post was a homework infraction. Well, im currently trying to figure out how to use Raspberry Pi's (as im a starter)
I asked one of my... (1 Reply)
I've been experimenting with pseudo-terminals and found something I don't quite understand. Writing an EOF character to the master end doesn't work quite as I expect. Once I've written any other data, the master pty seems to treat a single ^D as a seperator, i.e. writing "abcabc" would let cat do... (1 Reply)
Hi,
According to my understanding tty files that are available in /dev directory are terminals that are given to different users.
please help me understand what are /pty files, like are they drivers to the devices..
also is the default tty terminal given to a user.. (2 Replies)
Hi,
We have around 200 SUN Servers in production environment and I have one box from where I manage all the servers. It's setup such that I can SSH from my box onto all the 200 servers with without supplying password. It is working fine but sometimes we notice the keys getting changed and asking... (1 Reply)
Hi,
We have around 200 SUN Servers in production environment and I have one box from where I manage all the servers. It's setup such that I can SSH from my box onto all the 200 servers with without supplying password. It is working fine but sometimes we notice the keys getting changed and asking... (0 Replies)
Hi all,
today I could not telnet in AIX 5.2 cause I received the error
"telnetd: All network ports in use".
To allow users to telnet again I increased the number of ptys from default 256 to the new number 512.
To avoid the same problem in the future and for a better understanding, I need... (2 Replies)