I was having a problem with ssh taking almost 45secs to log into one of my Solaris 10 boxes. What I found out was for some reason it was taking forever to do dns resolution. What I did to fix it was adding this to /etc/ssh/sshd_config
LookupClientHostnames no
GSSAPIAuthentication no
Then do a restart
Makre sure you check for typos or ssh will not restart and you will have to login via console to fix it.
svcadm restart network/ssh
Friday, September 18, 2009
Wednesday, September 16, 2009
Create a SSH tunnel
This will allow you to tunnel traffic through a firewall.
Example tunnel Service Manager Client that uses port 32001
ssh -N -p 22 brent@183.40.33.34 -L 32001/localhost/32001
Here is the break down of the command:
Example tunnel Service Manager Client that uses port 32001
ssh -N -p 22 brent@183.40.33.34 -L 32001/localhost/32001
Here is the break down of the command:
- ssh - the actual SSH commad
- -N tells SSH we don't want to execute a remote command. Not terribly necessary, but makes it safer.
- brent@183.40.33.34 - account and SSH host info. user name will at server 183.40.33.34
- -L 32001/localhost/32001 This one creates the tunnel. It tells SSH to forward traffic from port 32001 on the local machine to port 32001 on the remote machine.
Now you can load up Service Manager and connect to localhost instead of 183.40.33.34
Very helpful VI commands
Remove Blank Lines
- :g/^%/d
Remove carriage returns ^M from lines
- :%s/.$//g
Remove lines that start with #
- :g/^\#/d
Changing the IP / Hostname on Solaris 10
Changing the IP on Solaris 10 requires editing two files:
1. /etc/hosts
If you are changing network address, you will need to change the defualt gateway address in the file:
2. /etc/defaultrouter
Changing the hostname now only requires editing these files:
1. /etc/hosts
2. /etc/nodename
3. /etc/hostname.
4. svcadm restart network/physical
1. /etc/hosts
If you are changing network address, you will need to change the defualt gateway address in the file:
2. /etc/defaultrouter
Changing the hostname now only requires editing these files:
1. /etc/hosts
2. /etc/nodename
3. /etc/hostname.
4. svcadm restart network/physical
is the driver name followed by the instance number of the interface. ie. hme0, bge0, ce0, qfe0 - You can find all your network interfaces by drivername and instance# by running the following command: prtconf -D grep network
Reset ALOM password for a Sun v445
- Boot and log in as root.
Use the scadm command to reset the admin password:
a) cd /usr/platform/`uname -i`/sbin
b) ./scadm userpassword admin
Use the escape sequence "#." to get system back to the alom login
prompt.
You can now log into the admin account using the password from
that you just set.
Subscribe to:
Posts (Atom)