Skip to content

Tag: ssh

Why is /etc/profile.d only used at SSH login?

The use of /etc/profile.d is confusing to me. I can put a file in there for example with contents and when I logon the the machine using SSH MYVAR has a value. This machine is a Ubuntu desktop, when I logon using ordinary login and start a terminal MYVAR has no value. I don’t understand why this should …

change user and run ssh instruction in 1 line

I’m trying to change my user to one that doesn’t need password to run ssh instructions and then do exactly that, run an ssh instruction. What I have now is: But I’m getting the answer: if I put the instructions in a different file called testit like this: and I run: it works!, but I need to …

Pass Telnet Command to SSH in Bash Script

I’m trying to write a bash to first ssh into a server and then telnet from that server to a ElastiCache Redis endpoint. My Code is the following: telnet.sh I would like to call my bash script and have the user interactively be connected to the Redis Cluster so that the user can enter redis cli commands …