Sw download init - via config file bpr01069050ca574d200001






















Use ctrl-c to abort configuration dialog at any prompt. Default settings are in square brackets '[]'. Basic management setup configures only enough connectivity for management of the system, extended setup will ask you to configure each interface on the system. Would you like to enter basic management setup? The enable secret is a password used to protect access to privileged EXEC and configuration modes. This password, after entered, becomes encrypted in the configuration.

The enable password is used when you do not specify an enable secret password, with some older software versions, and some boot images. The virtual terminal password is used to protect access to the router over a network interface. View solution in original post. If you have the IOS file on usb, you can boot from the usb and copy the.

Hi Meheretab,. I will probably share the log file for future reference if there's anyone struggling with this. Error[22]: Failed to open directory! Error: command 'show' not found. Method Status Protocol Vlan1 Enter your selection [2]: 2 Building configuration I am glad it is working for you, and thank you for sharing your solution! It will definitely help someone in the future. Buy or Renew. Find A Community. Cisco Community. Join us in congratulating October's Spotlight Award Winners!

Turn on suggestions. Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type. Showing results for. Search instead for. Did you mean:. All Community This category This board. Catalyst IOS install. I know it sounds dumb but can someone help me to install the IOS file there again?

I have tried various things with googling, looking at Catalyst document, watching Youtube. Somehow I didn't make it work. I can't use flash command from here and it doesn't give me dir: flash. Do you guys have any idea how to install this? Log file here as attachment is sometimes annoying. Labels: Labels: Catalyst Tags: Catalyst Preview file. All forum topics Previous Topic Next Topic. Accepted Solutions.

In response to Meheretab Mengistu. Meheretab Mengistu. This allows you to add more than one SSH public key to the file. For instance, if you have an SSH key pair for your laptop, your desktop, and your computer at work, you could add all of those as separate items in the ssh-authorized-keys list.

You can then paste the complete contents as an item under our ssh-authorized-keys entry. SSH public keys can be posted openly, so this does not represent a security risk:. If you wanted to add additional keys, that can be done by adding another dash followed by the second public key:.

The next step is to configure sudo access to our new account. To reiterate, we will be configuring password-less sudo access since we will not be setting a password on this account due to the security limitations.

First, we will be creating the entry we want to use for the sudoers file. The entry we need to create will not need to include the username, since cloud-init is smart enough to figure out the account name from the entry information.

The directive we need to use is sudo , which is aligned with our other users level directives. For our guide, since we are configuring password-less sudo capability, will look like this:. Inside of this file, the entry will look like this:. The second thing we are going to do is actually add our user to the sudo group. This is not strictly necessary since we have an entry specific to our new account that is parsed by sudo , but it gives us more flexibility.

Later on, we may wish to manually set a password for our user and require that password for sudo commands. If our user is already in the sudo group, all we would have to do is set a password and remove the entry in the cloud-init-users file. This will make a transition to a more traditional sudo setup easier.

We will show you how to do this at the end of this guide. This is a much more pared down environment than most people are used to, so we want to manually specify a bash shell environment for our new user. This can be accomplished with the shell directive within the users level item. All we need to do is point it to the full path of the bash executable:.

We have completed our new user configuration. We can now move on to the optional steps that lock down our SSH daemon. The next steps can be useful for increased security.

You can implement any or all of them as you see fit. Check out the guide we are automating to get more information about these options. We will show you how to implement each of the items using two different methods. To reiterate, the changes that we are interested in making are:.

There are two approaches to making these changes. The first is to completely rewrite the file by supplying the entire configuration file within our cloud-config file. The second is to strategically make the changes using common Linux text utilities. Both of these have their advantages, and both demonstrate different directives in cloud-config.

We will cover each in turn. The first strategy for making the changes that we want is to completely rewrite the file with the exact contents that we want. This allows us to have complete control over the file, regardless of what is available there by default.

The methodology is straight forward and it is easy to anticipate the results of our actions. This is a top-level directive, so it should be placed outside of the users section we had been working in previously. In our case, we will only be writing one file. For each file, we supply details about the chanegs we want to make. For instance, parameters that you can use are path , content , owner , permissions , and even encoding. By default, the owner of files created with this method is root and the permissions are , which is exactly what we want.

So we only need to supply the path and content directives. For the content , we will want to provide the entire contents of the file, to be written as-is. Remember, we can use the pipe character to pass in a block of text that will maintain its formatting. The complete section to rewrite our file will look like this:. Linux systems come with a variety of powerful text manipulation tools that we can leverage to make only the changes we need.

To run arbitrary commands, we will use a directive called runcmd , which allows us to run any command on the system. Each command will be a list item under the directive. These can be given either as strings representing the entire command, or as an array with the command and all options as elements. We will be using the sed command, which is made for string substitutions. Although you can pass multiple operations to a single sed command, we will do a single operation for each sed command.

This will allow us to troubleshoot any problems easier. Our first sed command will change the line that configures the listening port. Once again, we will replace the entire line, this time with PermitRootLogin no :. Afterwards, we will need to restart the SSH daemon so that our changes are propagated.

We have now accomplished all of our adjusted goals using the cloud-config file. You can either create your server using the control panel, or use the API to spin up a server. If you are having some issues getting your cloud-config file to work correctly, you can check for clues in the log files. You can usually find some good information about what happened by using grep to search these files.

If you have gotten to the situation where you cannot log into the server you created because of some configuration problems, it is best to destroy the server and start again. Remember, any password that you place here will be readable to every user on your server for the entire life of your system, so destroy this Droplet after you find out what the problem was. You can then start another server using the corrected cloud-config file.

If you would like to configure more conventional, password authenticated sudo access after your server has been deployed, you can easily take the following steps:. First, you need to set a password for the new account. The only way to do this without having to enter the current password which does not exist is through sudo.

Now that you have a password for your account, verify that you are, in fact, in the sudo group. This can be done by typing:. Now, edit the cloud-init-users file with the visudo command, by passing the file as an argument:.

Save and close the file. Your account will now require your password to execute sudo commands. Using cloud-config files to complete the initial configuration of your servers can be easy and save you time in the long run.

The files are easy to tweak and building up a number of different configurations can give you great flexibility in quickly setting up servers. By combining cloud-config with a more traditional configuration management system after the machine has been brought online, you can quickly and easily bring new machines exactly into the desired state.

Where would you like to share this to? Twitter Reddit Hacker News Facebook. Share link Tutorial share link. Sign Up. DigitalOcean home. Community Control Panel. Hacktoberfest Contribute to Open Source. By Justin Ellingwood Published on October 13,



0コメント

  • 1000 / 1000